Trouble with Images and Bound Object Frame

R

Rico

Hello,

I have an MDE application where I use a bound object frame to display an
image. This frame is updatable and bested on the contents of an OLE field.
My problem is, some images display as the image and some display as an icon
with the file name below. The process I'm following is as follows;

Right click
Choose "Insert Object..."
Select "Create from File"
Select the image file from the windows folder

I can't figure out why some work and some don't. Is there a better way to
deal with this? It's important that this image is kept in the OLE field,
but so far I can't figure out how to make this work properly.

Any help would be appreciated.

Thanks!
Rick
 
B

Bill Mosca, MS Access MVP

Rick

The best way to use images is to store the image path, not the image. Images
cause tremendous bloat in Access databases. And as you see, anything but a
bitmap shows as an icon in a bound image control.

If you store the path of the image, you can change the Picture property of
an unbound image control based on the path.
 
L

Larry Linson

Rico said:
Hello,

I have an MDE application where I use a bound object frame to display an
image. This frame is updatable and bested on the contents of an OLE
field. My problem is, some images display as the image and some display as
an icon with the file name below. The process I'm following is as
follows;

Right click
Choose "Insert Object..."
Select "Create from File"
Select the image file from the windows folder

I can't figure out why some work and some don't. Is there a better way to
deal with this? It's important that this image is kept in the OLE field,
but so far I can't figure out how to make this work properly.

Unless this is a homework assignment, or unless someone in authority has
arbitrarily ruled it so, I can't imagine why it would be "important that
this image is kept in the OLE field." When you store images as OLE Objects,
you put yourself at the mercy of the software the user has registered for
the image file type.

If you mean "different images" on the same computer, in the same Fields,
display or show an icon in the same Control, one reason could be that they
are different image file types, and the registered software for those types
is different, or the same software treats the image types differently.

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. We are led to
understand that the problem of "database bload" with OLE Objects has been
eliminated in Access 2007.

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
 
R

Rico

Thanks Larry,

I've tried playing around with converting the current process to use the
"Image" control and the problem with that is the program is being packaged
and released as an MDE with a runtime version of Access, to users who (at
least some of which) do not have office or the office graphic filters
installed. I have been able to overcome some of the issues (the common
location) using code, but am having trouble with the graphic filters issue
and also setting the Picture property of the image file is generating a
"Doesn't support the format of the file......or file is too large." error
message. When I select the image in the control property, it displays fine,
but setting the picture property in code is what is generating this error.

Any ideas?

Thanks!
Rick
 
L

Larry Linson

Rico said:
Thanks Larry,

I've tried playing around with converting the current process to use the
"Image" control and the problem with that is the program is being packaged
and released as an MDE with a runtime version of Access, to users who (at
least some of which) do not have office or the office graphic filters
installed. I have been able to overcome some of the issues (the common
location) using code, but am having trouble with the graphic filters issue
and also setting the Picture property of the image file is generating a
"Doesn't support the format of the file......or file is too large." error
message. When I select the image in the control property, it displays
fine, but setting the picture property in code is what is generating this
error.

Any ideas?

Have you looked at MVP Stephen Lebans' site, http://www.lebans.com. If I
remember correctly, he has a free ActiveX control for displaying images.
 

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