Macro exports queries

  • Thread starter Thread starter juan
  • Start date Start date
J

juan

Hello,
I have a macro that exports 12 queries, one for each
Period 1-12. I have a parameter so that I can export what
I want. But not all periods have data since its base on
data. So is there a way I can run the macro but export the
periods that have data? For example, in May that's period
5 so if I run the macro it will export 12, but its just
waste of time.

Please advise if there's anything I can do to run certain
periods instead of all the periods.
Thanks,
Juan
 
Juan,

It is very difficult to answer your question without more detail about
how you have this set up, as regards what actions your macro ius
comprised of, and what you mean by the word "parameter". But in
general, it may be possible to use a Condition in your macro to test
whether there is any data in the query, before it does the export. An
example might be...
DCount("*","YourQuery")>0
 
Back
Top