display photo on report

peggypph

Registered User.
Local time
Today, 14:04
Joined
Jan 2, 2004
Messages
33
I got a master table where one of the field is the path of the picture. I would like to design a report to print the table information e.g. product code together with the photo. :o Thanks
 
Seeing you have no respons on this one, I'll bite...

I can't say this is the best way to do it but it's one way...

Insert an image onto your report. Access will open a window for you to select an image. Select something because if you cancel, the image control will not be inserted. After you have selected an image, go into properties for the image and delete the path under Format/Picture. Name this control imgPhoto.

Add a textbox with its control source being the field containing the path to the photo. Make this control non-visible and name it txtPhotoPath.

Now click on the detail section (away from any control) and then select the On Format Event. Insert this line of code:

Me.imgPhoto.Picture = Me.txtPhotoPath

Of course you will need to fine tune the properties so the image comes out looking the way you want.

Hope this works for you.
 
Thanks! It works!
 

Users who are viewing this thread

Back
Top Bottom