With report I have created a no data Event. The problem arises when this event runs cause DoCmd.OpenReport "rptPickingList" is cancelled and a runtime error occurs.
The error is supposed to happen, it sounds like you have 2 minor problems.
1. you do not have an error handler where you make your report call from.
2. you do not have a sub to handle the no data event
1a. insert something like this
ExitError:
Exit Sub
ErrHandle:
If Err <> 2501 Then MsgBox Err.Description, , "YrApp"
Resume ExitError
2a. on your report insert this
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No data was found - the report will close" , , "YrApp"
Cancel = True
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.