View Full Version : Macro problem


Arendvan
06-30-2009, 12:44 AM
I'm running multiple reports in a Macro (each report runs an underlying query selecting appropriate data) - if their is no data as a result of the query (which is possible) how do I stop the macro running the report so I can then go onto the next report.

namliam
06-30-2009, 12:51 AM
You can probably use the "on no data" event of the report...

Arendvan
06-30-2009, 07:16 AM
You can probably use the "on no data" event of the report...

Thanks Mailman - however - this appears not to work - I want the macro to stop i.e. don't print the report so I created another Macro to stop the report but it comes back with an error "This action can't be carried out while processing a form or report event" - any ideas?

hiền muội
06-30-2009, 06:06 PM
With macro condition you can use DCount function to preview report if their is data as a result of the query.
For ex:
Dcount("*","QueryName")>0