How to display image from database?

G

Guest

Hello -
i have a table that has an image for each record. I am trying to create a
form to view the data and the image. When I place a bound OLE Object on the
form and set its Control Source property to the field in my table that has
the photo...the image never appears. I can see the other data, like the
name, but never the image.

Is it even possible to display an image that is stored in the Access
database? I have seen articles that explain how to display images that are
stored in the file system, but never from within the database.

thanks for any help
- will
 
L

Larry Linson

dw said:
i have a table that has an image for each record.
I am trying to create a form to view the data and
the image. When I place a bound OLE Object
on the form and set its Control Source property
to the field in my table that has the photo...the
image never appears. I can see the other data,
like the name, but never the image.

Is it even possible to display an image that is
stored in the Access database? I have seen
articles that explain how to display images that
are stored in the file system, but never from
within the database.

There is a Property of the Bound Object Control specifying Thumbnail or
Icon -- be sure it is set to "Thumbnail". But, even so, you are limited
because Access must work with whatever software is registered by the user to
handle the image file type. If the registered software doesn't provide
appropriate capability, Access can't do what you want.

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. Access 2007 has,
I am told, eliminated the bloat problem, but you are still "held hostage" to
whatever software the user has registered for handling the image file type.

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.

Larry Linson
Microsoft Access MVP
 
G

Guest

Larry -

Thanks for the reply and information. I'll check out the examples you
mentioned.

In my case, I am the only one person going to be using this database. How
can I tell "whatever software is registered by the user to handle the image
file type" in my case? Is this some sort of special image handling software
or something as simple as MS Paint or something?

- will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top