ImageFrame Problem with Empty Reports

  • Thread starter Thread starter trekgoes2malaysia
  • Start date Start date
T

trekgoes2malaysia

I am getting this "type mismatch" error when I try to open a report
that has no records. The report normally displays a picture of the
client if they have one or more records in the report. If they don't,
it should be able to still open the report but just show no records. I
have traced the source of the error to the following code in the
pageheader of my report.

ImageCyclist.picture=[picpath]

The [picpath] is a field inserted in the pageheader that contains the
pathname or link where the picture of the person is retrieved from.

How can I prevent this error from appearing??

Patrick
 
I am getting this "type mismatch" error when I try to open a report
that has no records.  The report normally displays a picture of the
client if they have one or more records in the report. If they don't,
it should be able to still open the report but just show no records. I
have traced the source of the error to the following code in the
pageheader of my report.

ImageCyclist.picture=[picpath]

The [picpath] is a field inserted in the pageheader that contains the
pathname or link where the picture of the person is retrieved from.

How can I prevent this error from appearing??

Patrick

Can't you just put an If statement in there checking the condition of
picpath? If something's there, bung in the picture, otherwise disable
the image control or put a standard "no photo available" in it?
 
You can test the HasData property of the report:
If Me.HasData Then
ImageCyclist.picture=[picpath]
End If
 
Back
Top