Printing JPGs in Access 2003 report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field for the filename of an image & in the OnFormat event of the
Detail section have a line like:
imgPhoto.Picture = txtPhotoFile
where imgPhoto is an Image box on the report and txtPhotofile is a bound
control to a text field in the source table.

This works provided that Photofile is not null.

Setting the .Picture to null raises an error while making it an empty string
leaves the image from the previous record. How do you blank the image box
when the path is null?
Terry
 
If Not IsNull(Me.txtPhotoFile) Then
Me.imgPhoto.Picture = Me.txtPhotoFile
Me.imgPhoto.Visible = True
Else
Me.imgPhoto.Visible = False
End If
 
Thanks
Did try that originally but the Visible property was not available. It does
work though.
Even more interesting is that the following works in a form but not on a
report!!!

Me.imgPhoto.Picture = "(none)"
 
Back
Top