If the path-and-file-name of the image is stored in the Record, you should
simply be able to include in the Print event for the Detail Section:
Me.imgImageCtl.Picture = Me.txtImagePathAndFile
Note that because of the way Reports work, you'll need to have the image
path and file information in a Control in the Detail Section (which I have
called txtImagePathAndFile).
As you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans'
http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can happen when printing image intensive reports.
Larry Linson
Microsoft Access MVP
"urange" <ur****@gmx.dewrote in message
news:11**********************@j27g2000cwj.googlegr oups.com...
Hi to all,
I am setting up a database which has to store a great number of
images. I will therefore store the images not as OLE but as a text
link to the file (maybe I'll try the BLOB-solution).
While it is no problem to show the image in a form with the .picture
property, I am trying to find a way to show the image on a report. So
far, I can only do this by the following code sequence:
stDocName = "Test_Report"
DoCmd.OpenReport stDocName, acDesign
Reports(stDocName)![Image1].Picture = "c:\temp1.bmp"
DoCmd.OpenReport stDocName, acPreview
I have to open the report first in design mode in order to set the
picture property.
The bad thing about this is that the user will get to the design of
the report when closing in the preview.
Does anybody know how to handle this or is there a different better
way?
Thanks in advance!
Uwe