Running a string of savedexport macros, some with no data

Shovell242

Registered User.
Local time
Today, 04:07
Joined
Jul 30, 2013
Messages
14
Hi guys,

I have a database that I want to export about 15 trade tickets to a folder. The kicker is that somedays some of the trade tickets will not have any data, and I don't want them to export.

I have a cancel event macro set up on each reports NO DATA property so you can't even view it if you wanted if that were to happen.

However, when I saved the export options for each ticket on a day they all DID have data, the days that they don't have data the export macro fails.

Is there any work around on reports that have no data that would cancel the savedexport and just go to the next report?
 
Here is a solution, use the If statement in the macro

if dcount("*","yourQueryName")<1 then stop the macro, else continue on


I've uploaded a sample that is looking for more than 10 records in a query. Change my >10 to >2 and it will pull up the query instead of displaying a message box.

Hope that helps.
 

Attachments

Users who are viewing this thread

Back
Top Bottom