Multiple images from same control in report

tscotti

Registered User.
Local time
Yesterday, 21:56
Joined
Aug 15, 2004
Messages
47
All,

I’m trying to insert a maximum of three images in a report via a linked path defined in a control that resides in the Details section of the report. I have successfully done so with one image using the code below:

Private Sub Report_Activate()
' After selecting an image for the product, display it.
On Error Resume Next
showImageFrame1
Me![ImageFrame1].Picture = Me![ImageFile]
End Sub

Sub showImageFrame1()
' Display the image control
Me![ImageFrame1].Visible = True
End Sub

The issue is that the image controls (ImageFrame1..ImageFrame3) that ultimately display the images must be in the Footer section of the report.

How do I display Detail Record #1’s linked path in ImageFrame1, Detail Record #2’s linked path in ImageFrame2, and so on.

Any help is greatly appreciated.

Tony
Montreal
 
Rather than OnActivate, try the report's Detail Section "OnFormat" event.
 
I am having a similar (I think) problem.

I have linked images on a form for product entry. I have it set up so the db stores a link and the form uses an image control which by code is set. For example image control imgPhoto1 is set by imgPhoto1.picture = link which works great.

However, I am now trying to implement the same thing on a report. I can get the images to show up using a image control that is looking at a hidden text field on the report. This works great when the report is loaded up but I can't figure out how to get the images to change for each product in the report. So say all 10 records are showing the same pictures when I step through the pages. Is there an event I can use that would update allow me to update the pictures? This will also be printed so it will have to work for that too.

I'm just not familiar enough with access.

Thanks


edit****

I think an easy way to put it is, I need to update the properties of an image control for each record on the report.
 
Last edited:
The image must be a field in your report record source, i.e., it's fdifferent for each reported record.
 
The image must be a field in your report record source, i.e., it's fdifferent for each reported record.


I found out what I was doing was working, problem is if there is no images attached the image.picture property is not set back to none so whatever the previous image was is there. That I'll have to work on.

Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom