How to display image from database?

  • Follow


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
0
Reply Utf 5/11/2007 4:43:01 PM

"dw" <dw@discussions.microsoft.com> wrote

 > 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 


0
Reply Larry 5/13/2007 4:45:47 AM


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

"Larry Linson" wrote:

> 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 
> 
> 
> 
0
Reply Utf 5/13/2007 4:25:00 PM

2 Replies
999 Views

(page loaded in 0.077 seconds)

Similiar Articles:
















7/20/2012 8:02:58 AM


Reply: