Question : No data found in report

Experts,
If there is no data when trying to print a report in the NoData event I execute the following:

MsgBox "No Data Found!", vbExclamation, "No Data Found"
rstReport.Close

Here's my questions: What is rstReport for and can I continue my code with

Docmd.OpenForm "frmMainMenu"

after rstReport.Close

Answer : No data found in report

that is right


Private Sub Report_NoData(Cancel As Integer)

MsgBox "No Data Found!", vbExclamation, "No Data Found"
cancel=true
Docmd.OpenForm "frmMainMenu"
end sub

Random Solutions  
 
programming4us programming4us