I have a calendar control which opens a report PPAPCompleteRequests. If there are no records to display, on no data I have the following:
MsgBox "No records to display, try another date range!"
cancel = true
This works great, but now I have to print another report PPAPCompleteNONE. I added the following code, which works except for the runtime error. I'm guessing there is something not correct with my code OR do I try and hide the error?
This is what I have
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No records to display, try another date range!"
DoCmd.OpenReport "PPAPCompleteNONE", acPreview
DoCmd.closereport "PPAPCompleteRequests"
Cancel = True
End Sub
MsgBox "No records to display, try another date range!"
cancel = true
This works great, but now I have to print another report PPAPCompleteNONE. I added the following code, which works except for the runtime error. I'm guessing there is something not correct with my code OR do I try and hide the error?
This is what I have
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No records to display, try another date range!"
DoCmd.OpenReport "PPAPCompleteNONE", acPreview
DoCmd.closereport "PPAPCompleteRequests"
Cancel = True
End Sub