Can Shrink an Image Field?

M

Melinda

I have a table which has a field for a picture - data type is OLE Object.
Some (but not all) records have a picture pasted in this field (enhanced
metafile). In a report based on this data, I need to include the picture if
there is one, but if there is not a picture I need the report to not have the
big gap (empty space set up for the image field). Is there a way to tell
access if the image field is null, to shrink that field in the report?
 
L

Larry Linson

Neither the Image, Unbound OLE Frame, nor Bound OLE Frame have
CanGrow/CanShrink properties.

I recall, in the past, using VBA to try to adjust sizes and don't remember
the outcome. If I had a little more time and energy, I'd look into that,
but, alas, both time and energy "come at a premium", these days.

Should you decide to pursue that, put your VBA code in the Format event.
I'd be using an Image Control, with the "external file approach" described
in the examples I will later reference. I'd check to see if the path and
filename of the image were Null, then I'd set the height and width
properties of the Image Control to a miniscule amount. If the path and
filename of the image was not Null, I'd reset the height and width of my
Image control to the default. The Detail Section does have CanGrow and
CanShrink, but don't know if that'd be useful in this situation. You could
try adjusting the height of the Detail Section, too. Sorry I don't remember
whether this worked, before.

Regards,

Larry Linson
Microsoft Office Access MVP
 

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