Test If a macro/query has already been run

E

Eric Aho

Good Afternoon,

In Access '03 I have a macro which runs an append query, then a select
query. I only need the append query to run once a day. If they user runs
the macro a second time in one day I only want the select query to run
because the append query has already populated the appropriate information.
Having the append query only run once a would make multiple daily runs of the
macro much quicker. Does anybody have any suggestions? Thanks!
 
J

Jeff Boyce

Eric

Without more specific description, I can only offer a general suggestion ...

If you modify your macro to test for a condition before running the append
query, the condition you'd test for might be whether the appended-to-table
(already) has any of "today's" records in it. If it does, skip the
append...

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top