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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report_nodata not happening 1

Status
Not open for further replies.

pullingteeth

Programmer
Sep 26, 2003
128
US
Hi, I choose to give my users a msgbox rather than a blank report when there is no data. On all but one of my reports, adding the following (or similar) to the report's events works fine. However, on the one particular report, this following is not triggered, and the report shows up with no data. The code's below...any suggestions for debugging?

Code:
Private Sub Report_NoData(Cancel As Integer)
    Cancel = True
    MsgBox "There were zero results to your search", vbInformation
End Sub

Thanks!
 
View the report event properties dialog and make sure the property for On No Data says [Event Procedure]. You can also try to set a break point in the code.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Thanks. I had pasted the nodata event procedure into the code; this worked on all of my other reports to somehow register with the event properties - however, not in this case. As you surmised, the property for On No Data was blank; I just had to change it to [Event Procedure] and it worked.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top