Lets assume the paths to the image files are stored in a text field
ImageFilePath you'd first add a text box bound to the field to your report's
detail section and set its Visible property to false (No in the properties
sheet) to hide it. Then add an Image control to the Detail section in your
report, which should include the field in its and size it to fill the page,
or whatever part of the page you want the picture to occupy.. When you add
an Image control to a report in design view it will prompt you for a file.
Just select any image file and then in the control's properties sheet delete
the entry for its Picture property, confirming that you do wish to do so when
it prompts for confirmation.
In the image control's properties sheet select Zoom as the SizeMode property
so that the picture fills the control but retains its proportions. For its
PictureAlignment property select how you want the picture to align in the
control of it doesn't fit the proportions of the control exactly (centre, top
left, top right etc).
Next select the detail section of the report by clicking on the section's
header bar or any blank area within the section in report design view. In
the section's properties sheet select the On Print event and click on the
build button (the one on the right with 3 dots). At the next dialogue select
Code Builder. When the VBA window opens at the Print event procedure enter
the following line between the two lines already in place:
Me.YourImageControl.Picture = Me.txtImageFilePath
substituting the actual name of your image control. Also in the detail
section's properties sheet set its ForceNewPage property to True (Yes in the
properties sheet) to After Section so that each image is on a new page.
You can do exactly the same with a form in single form view as in a report.
The only difference is that the line of code would go in the form's Current
event procedure.
The above does assume that each record includes a path to an image file. If
the path could be Null then you should hide the image control, so the code
would be:
Me.YourImageControl.Visible = Not IsNull(Me.txtImageFilePath)
Me.YourImageControl.Picture = Me.txtImageFilePath
With .bmp files the pictures will load seamlessly. With JPEGs a progress
meter pops up each time. If you want to suppress this use the following
registry hack:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Graphics
Filters\Import\JPEG\Options]
"ShowProgressDialog"="No"