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

Reports with 'No Data' 1

Status
Not open for further replies.

rgbanse

MIS
Jun 4, 2001
211
US
I'm using DoCmd.OpenReport... with the necessary criteria and conditions - opens fine. At this point, is there a way to test the report for a 'No Data' state using VBA. I've tried creating a constant and usnig the 'On No Data' function within the report to pass a value to the variable with out any success.
Help always appreciated.
thx
RGB
 
There is a NoData event procedure with a Cancel argument.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
RGG,
Just to add to the previous post. Type this code on the No Data Event.

Code:
Private Sub Report_NoData(Cancel As Integer)
    MsgBox "There is no data for this report. Canceling report..."
    Cancel = -1
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top