Condition to stop blank report creation

C

Carlos

I use a module to automatically send out a few reports
using DoCmd.SendObject. The datasource for the reports
are queries. I don't want to send out blank reports when
there is no instances to be reported. Is there a test
condition I can use in the module that would determine
that the output of the query is blank, and therefor skip
the SendObject line.
I am using Access 97.

Thank you,

Carlos
 
P

Phil Hunt

There is a NoData event with the report object. Try to see if it does you
any good.
 
C

Carlos

This is close. But unfortunately using this to cancel the
generation of the report, I get a message box "The
SendObject action was canceled." The "DoCmd.SetWarnings
False" statement does not suppress this either. :(

Thank you,

Carlos
 
P

Phil Hunt

That is an error you can trap and discard, just take down the err.number and
code around it.
 

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