Linking pictures to report

  • Thread starter Thread starter Perry Johnson
  • Start date Start date
P

Perry Johnson

I would like to create a Photo Catalog report that will bring back Part
Number, Description and Price. I know how to bring back the Part number,
Description and Price. I have pictures of each part SAVED using the part
number as identifier. Ex. 30A410.BMP, 30A410 is also the Part Number. What
I would like to do is link a picture frame in my report to bring back a
picture for each part number. How would you go about doing this?


TIA,
Perry
 
Hi Perry

Put an Image control on your report. Select any picture file for the image.
Then, in the control's Property sheet, delete the Picture property - it
should then show (none) - and change the Picture Type to "Linked". Change
the control's name to "imgPartPhoto". You will probably also want to change
Size Mode to "Zoom".

Now, in the Format event procedure for the section containing the image,
write some code to load the image file:

imgPartPhoto.Picture = CurrentProject.Path _
& "\PartPhotos\" & Me![Part Number] & ".BMP"

This assumes the photos are stored in a subfolder called "PartPhotos" below
the folder containing your database. You will need to modify the path as
required.

--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand

Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.
 
Back
Top