.png image on a label report

DavidTayse

New member
Local time
Today, 15:18
Joined
Mar 26, 2014
Messages
4
Coding problem - I have a report reading directly from a table. Table has a text field "txtOldState" where the field data a 10 digit number. Also have a directory with .png files named with same 10 digit number. The txt field is on the report - I need to print the associated .png file on the report along with the 10 digit "txtOldState" field. I'm failing at pulling a png from the folder to print on report. Is there some simple code that will complete this task.
 
Last edited:
I am assuming you have Access 2007+. First you need the full Path (Sub Directory Optional):

ImagePath X:\Directory\SubDirectory\

Then the Image File

ImageFile = ImagePath & txtOldState & ".png"

Put this in a Query using the Table.

On your report Create Image Control and name it.
In the Image containers Control Source try =[ImageFile] from the underlying Query

Simon
 

Users who are viewing this thread

Back
Top Bottom