"RAllsopp" wrote
I have a client who would like to have
several pictures associated with one system.
I have read about storing only the pathname
to save OLE overhead and have set-up a
form for my client to browse/add one
picture at a time to a system. Now he would
like to 'view' all of the thumbnails associated
with any system on a single form.
I can setup a main/subform scenario, but how
do I show all of the pictures as thumbnails. I
was using the unbound OLE control to show
one at a time - can I somehow loop through
several to show at once?
A form with several Image or OLE controls will be required to show the
thumbnails. One of the difficulties with saving pictures as OLE Objects is
that Access and the imaging software registered for the image file type
create a bitmap thumbnail to show in a small control that you can double
click to open the registered imaging software. But, another problem is, that
even if you specify "show thumbnail" in the control's properties, you are
"at the mercy" of whatever software the user has registered -- and not all
of them will display a thumbnail.
My best luck has been with Image controls. That approach is similar to the
one you are using with unbound OLE frames. You'll have to write code to fill
the controls for the user's multiple thumbnail display and code to navigate
through the saved images, too.
Can the user double-click on a picture to
bring up its application?
This is a feature of the OLE Controls. It would be possible, I believe, for
you to put code in the double-click event of an Image control to simulate
this using Windows APIs.
The sample imaging databases at
http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.
If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans'
http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.
Good luck with your database application.
Larry Linson
Microsoft Access MVP