NoData Report property

R

Richard

What I want to do is open a report, and immmediately after
opening it, check to see if there is any data in the
report. I can sucessfully open the report from VBA, but
when I add in the If statement that checks for a NoData
situation I get the error:

Run-Time Error '2451'
The report name 'Monthly Branch Report' you entered is
misspelled or refers to a report that isn't open or
doesn't exist.

How can this be? I opened the report in the previous line
of code. Here is a snippet of the code...

DoCmd.OpenReport "Monthly Branch Report",
acViewNormal, , "[brancd]=" & rst!Branch

If Reports![Monthly Branch Report].NoData = False Then
<<perform operation>>
End If


Any suggestions would be much appreciated. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top