Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Double Message

Status
Not open for further replies.

OraMs

Programmer
Feb 12, 2000
40
0
0
US

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.

Steve King


Growth follows a healthy professional curiosity
 
Hi Steve,

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.

Again, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top