Unanswered: Closing a report with no data to diplay
I have a command button that opens a report. If the report doesnt have any data display (the query it is based on returns no rows) i get #error for some of my field. What i want is for a msgBox to pop up saying "no records returned" or something, and to not even display the report.
I know reports have the "on no data" event. I got the message box to pop up, but how do i prevent the report from displaying? I tried a DoCmd.close but that gave me errors.