continuous

This article shows the proper way of image handling in continuous forms with the help of AccessImagine control. If you are looking for answers on some common questions about continuous forms, check the Continuous forms FAQ.

First of all just imagine one thing: time passed and you’ve got a 1000 pictures or so in your database. Every time you open continuous form with that images, your computer loads all of them at once. Surely it will have the hard time and even can freeze at once.

So what’s the solution? You don’t really need to show big pictures in continuous form. You need thumbnails. Thumbnails in OLE format for Access to handle it properly.

You can download the MDB file with entire solution to play with it:

Continuous pictures demo (Microsoft Office Access Database, 556 Kb)

.

Step-by-step

1. Lets assume you have AccessImagine picture control on your record edit form and its called Pic.

2. Create thumbnail field in your table (lets call it Preview) of OLE type.

3. Add On Exit event handler to your Pic control and insert this line:

if Pic.Changed then Preview.Value=Pic.PreviewOLE(128)

Now your Pic control generates a preview every time its picture is changed. Here 128 stands for preview longest side in pixels.

4. Create your continuous form, place Bound Object Frame on it and bind it to Preview field.

Now you’ve got continuous form with pictures, made in proper way.