ImageFrame Problem with Empty Reports

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
 
A

anthony

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?
 
D

Duane Hookom

You can test the HasData property of the report:
If Me.HasData Then
ImageCyclist.picture=[picpath]
End If
 

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