Errors when macro is prematurely ended

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hello,
I am using macros to print various reports that I
print on a regular basis. They work great except for
one. I have one reprot that from time to time doesn't
have any data in it. I set teh property for no data in
the form so that it gives a message, with an OK button,
then ends the report, this seems to give me an error with
the macro. Can any one suggest a way to correct this?

Thanks,
Mike
 
Mike,

When printing via macros, I think it is better not to try and rely on
the No Data event of the report. Instead, put the equivalent of this
into the Condition of the OpenReport macro action relating to the report
that sometimes has no data...
DCount("*","NameOfQuery")>0
.... where NameOfQuery is the query that the report is based on.
 
Back
Top