I have a macro that triggeres from a report's On No Data event. The only action on the macro is a msgbox advising user that "No data was found."
My problem is that the message is being displayed twice in consecutive order. Any thoughts?
Look in the report design at the "On No Data" event to see it it maybe already has code in the event like:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "No data found"
Cancel = True
End Sub
If so it would be double reporting the message. When code is used you can always use the debugged to determine what is happening and also perform error checking.
Thanks for your suggestion. There is no other code because I removed the macro and I did not get any errors. I solved by capturing the err.number where I'm calling the report. If not zero, display message, close report, exit.
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.