Showing pictures in query-based report

utzja1

Registered User.
Local time
Today, 07:22
Joined
Oct 18, 2012
Messages
97
I am generating a report that has a Select query as its record source. The query takes its data from a table that has an attachment field in it. In the attachment field, there is only one file per record and it is stored as a JPG. How can I query the table to retrieve and show this attachment? When I open my query in design view, there are 4 options (fieldname, fieldname.file name, fieldname.filedata, fieldname.filetype) for retrieving an attachment but I haven't been able to get the picture file to show up on the report.

A - Can I do this?
B - Do I pick one of the options, or all 4? If so, are they all shown in the query?
C - Do I use an image control on the report, or something else?

Any comments or suggestions would be greatly appreciated. Thanks.
 
Solved it. First, don't store pictures as attachments in the table to minimize the size of the database. Instead, have a field to store the entire file path to the target image, but use a text field (NOT the hyperlink option).

In query design view, include the field which contains the file paths.

On the form or report where you want the image, place an image control (if you have the Wizard option on, it will open folders for you to browse and select an image. Close this out without selecting anything). On the image control property sheet, set the record source to the field with the file paths, and also you will need to set the picture type to "linked". Access should automatically display the image if you do this.
 

Users who are viewing this thread

Back
Top Bottom