Solved Add attachment (pic) to a report.

DBrodin

Registered User.
Local time
Today, 09:30
Joined
Mar 5, 2011
Messages
21
I am trying to modify a database that I did for convention registration many years ago to print photo name tags for a reunion. My structure is a table (sheet 1) with names and a photo in an attachment field, a form (check-in) to select a record, and a report (Name tag) based on the record displayed in the form. I used this setup to print name tags without photos for years. The form loads and displays the name and photo correctly, but the image does not load in the report. My code for the attachment box of the report is
Code:
=[Forms]![Check-in]![photo]
. I am at a loss as to why the attachment loads in the form, but not in the report.
 
Did you use an Attachment control instead of a Picture control?
 
The photos are in an attachment field in the table, and attachment controls in both the form and the report.
Screenshot (125) copy.jpg
 
Your report should be based on the same table or query as the form and the control source of the attachment control on the report should not mention the form at all, should simply be [Photo].

Cheers,
 
That brings the photo across, but it is loading every record. How do I limit it to the record selected in the form?
 
SELECT * FROM [Sheet 1] WHERE ID = Forms![Check-in]![ID]
That did the trick!:D
I taught myself just enough Access ten years ago to write the database for political conventions that tracked who was present, and from what district, along with about a dozen reports. The name tag module I added about six years ago as an update. Adding photos to the mix was new territory for me. Thanks!!
 
You're very welcome, good luck with your project!

Cheers,
 
Glad to hear you got it sorted out. Cheers!
 

Users who are viewing this thread

Back
Top Bottom