Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing an image in a report

Status
Not open for further replies.

ByronFlateland

Programmer
Feb 8, 2002
1
US
I am storing an image in an external file and displaying it on a form using the Form_Current event procedure like so:
Image1.Picture = txtImageFile where txtImageFile contains the bound value of the file location stored in my table. This part works fine.

But when I print a report using the Image control and use the Detail_Format event to set the image picture (Image1.Picture = txtImageFile as has been suggested in several places in this forum) the image displays fine in Print Preview, but shows blank when I actually print it. Any suggestions on how to deal with this aspect of quirky old Access 2000?
 
That is weird. I am using the same basic concept and I get it to print fine, just takes awhile when you print 20 imnages per page at 50 pages/report. Maybe you could put your code sample up and I could help ya with it.

InnerSlice
 
I have been able to post my images that I have linked using Me![FrontImageFrame].Picture = Me![FrontImagePath] in the Detail_Format. An example of the problem I am having is as follows: I have 10 records. If records 1 and 5 have images and the others don't, when I advance through the records, the image from record #1 will show up in records 2,3 and 4. Then when I reach record 5, the image will change but will remain for records 6,7,8,9 and 10. When i had that problem in the form, I just set the code like so:
Private Sub Form_Current()
On Error Resume Next
Me![FrontImageFrame].Picture = (none)
Me![ProfileImageFrame].Picture = (none)
Me![FrontImageFrame].Picture = Me![FrontImagePath]
Me![ProfileImageFrame].Picture = Me![ProfileImagePath]
End Sub

This doesn't work in the reports section. PLEASE HELP.
 
You need to put that code in the Detail_Fomrat section of the report.

InnerSlice
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top