A
Alain
Hi to all,
I am having a problem using the NoData event on a report. On occasion there
will be a report being run by a user and that report might have no data when
some filters are being applied.
I use the NoData event to pop a warning msg to the user to select new
criteria
Private Sub Report_NoData(Cancel As Integer)
'cancel report if no recordset
MsgBox "There is no data to report on your criteria." & Chr(13) &
Chr(10) _
& "Please review your choice of selection."
Cancel = True
End Sub
When the report closes it give me the error "2501 the openreport action was
cancelled" at the command line to open the report: DoCmd.OpenReport
stDocName, acPreview, , strCond
Is there something I am missing here ??
Is there a way to correct this error msg
Thanks
Alain
I am having a problem using the NoData event on a report. On occasion there
will be a report being run by a user and that report might have no data when
some filters are being applied.
I use the NoData event to pop a warning msg to the user to select new
criteria
Private Sub Report_NoData(Cancel As Integer)
'cancel report if no recordset
MsgBox "There is no data to report on your criteria." & Chr(13) &
Chr(10) _
& "Please review your choice of selection."
Cancel = True
End Sub
When the report closes it give me the error "2501 the openreport action was
cancelled" at the command line to open the report: DoCmd.OpenReport
stDocName, acPreview, , strCond
Is there something I am missing here ??
Is there a way to correct this error msg
Thanks
Alain