Condition to stop blank report creation

  • Thread starter Thread starter Carlos
  • Start date Start date
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
 
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
 
That is an error you can trap and discard, just take down the err.number and
code around it.
 
Back
Top