Blank Reports to not open

E

Emma

Hi I have 3 reports which open from a macro. I would like the reports to be
displayed if there is information, however if the report is blank I don't
want to open it. Is there a setting which stops blank reports from openning?
 
B

BruceM

See VBA Help for information about the report's NoData event. Essentially
it is something like this:

Private Sub Report_NoData(Cancel As Integer)

MsgBox "No data"
Cancel = True

End Sub
 
B

BruceM

Glad to help. Check Help about message boxes to see how to add titles and
other features.
 

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

Top