I have a repport with a catching error message box. normally when there are records to repport it shows the image per record, but when I filter it by the results on a form query and there are no records to repport the image module gives error. My code is as follows:
Option Compare Database
Private Sub Report_NoData(Cancel As Integer)
MsgBox "There are no records to report.", _
vbOKOnly + vbInformation, "No Data"
End Sub
Private Sub Details_Format(Cancel As Integer, FormatCount As Integer)
Me![PictureImage].Properties("Picture") = Me![txtImageName]
End Sub
I guess all I need is to catch the error and stop the Details_Format when there are no records to show, but how?
Option Compare Database
Private Sub Report_NoData(Cancel As Integer)
MsgBox "There are no records to report.", _
vbOKOnly + vbInformation, "No Data"
End Sub
Private Sub Details_Format(Cancel As Integer, FormatCount As Integer)
Me![PictureImage].Properties("Picture") = Me![txtImageName]
End Sub
I guess all I need is to catch the error and stop the Details_Format when there are no records to show, but how?