Printing JPGs in Access 2003 report

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
 
D

Duane Hookom

If Not IsNull(Me.txtPhotoFile) Then
Me.imgPhoto.Picture = Me.txtPhotoFile
Me.imgPhoto.Visible = True
Else
Me.imgPhoto.Visible = False
End If
 
G

Guest

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)"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top