dynamically adding pictures to an Access Report

R

raja

I have a situation where each record in the table being reported could
have 0-5 pictures associated with it. I want to print those pictures,
if they exist, with each record's report. I cannot figure out a good
way to do this. I have been attempting to place 5 Image controls in the
Detail area of the report, organized vertically, so one comes before
the next as you go down the page. Then, in the report's VBA module, I
was trying to check the appropriate fields in the record, if the field
contains a path to an image then, I attempt to set the image control's
size (each image is approx 7.5 x 10) and set it's visible property to
true. If there is no path, then I was trying to set the
ImageControl.Visible property to false, and go on.

If I try to set the image control's size during design time, then I run
out of space on the report. It seems to have a size limit (about 21
inches) that will not let me add 5 image controls that each have a
height of approx 10 inches.

This is apparently impossible to do. I cannot set the control's Height
and Width properties during runtime, which seems amazing to me, nor can
I access the control's SizeToFit method. There are quite a few other
challenges as well.

Does anyone have a suggestion as to how to accomplish this task?
Let me know if you need more detail about this. Thank you.
 
G

Guest

I would start by normalizing the table so that the 0-5 image file references
become 0-5 records in a related table. If you can't change your table
structure, you can use a union query to normalize.
 
R

raja

Thank you for your reply.

Yes, the database I am working with is not even close to being
normalized. It is a temporary database created specifically for
reporting purposes (this is not my design, I started this job 2 weeks
ago) and, as soon as the reporting is done, the database is deleted (I
know that sounds crazy).
My problem really isn't accessing the image reference fields, its
figuring out how to display them. Since I can't dynamically size the
image controls, and the report size is limited in design mode, I am
limited to displaying only one of the 5 potential images. It seems like
it should a simple task but, I can't figure it out.

Thanks, again.
Roger
 
R

raja

Thank you again for your response.
I am sorry, but I don't understand how this helps.
If I need to display 3 images, or 5, then how do I do that? I haven't
been able to figure out how to make the image controls appear, or not
appear, on a conditional basis. If the record has 2 images with it,
show both, if it has no images, don't show any, and don't leave any
blank pages in the report.
Right now, we have "squeezed" all the multiple-image situations into
one image, so I just have one image control in the report. If there are
no images for the particular record, then the report will have a blank
page in it (remember, the image has to be about 10" in height) that we
will remove before delivering to the client. That is the best I can do
for this deadline.
I am sorry I am being dense about this.
Are there any resources to which you can point me that will describe
how to have image controls in an access report on a conditional basis?

Thanks again for your advice and patience.
Roger
 

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