Automated Daily Import

R

Racer57

I want to automatically run an import on a daily basis. But I only want it
to run the first time the database is opened on that day. Any idea how I can
create an Autoexec macro to only run if it has not run on that day?

I already have the import macros working, just need to run them only once
per day.

--
Paul Mazzola
General Manager-High Speed Data Services
Time Warner Cable
Eastern Carolina Division
Wilmington NC
Ph: 910-772-5793
Fax: 910-772-5796
 
S

Steve Schapel

Paul,

Here's one idea...
Make a new table, one field (date/time data type), one record (start it
off with today's date).
Make an Update Query to update the date field in this table to today's date.
In your import macro, put an OpenQuery action to run this Update Query
(after you have it working correctly, you will want to also put a
SetWarnings,No action before the OpenQuery, to suppress the display of
the action query confirmation messages).
In the Condition of the macro actions, put the equivalent of...
Date()>DLookup("[YourDateField]","YourDateCheckTable")
 
R

Racer57

Thanks - that did it!!

--
Paul Mazzola
General Manager-High Speed Data Services
Time Warner Cable
Eastern Carolina Division
Wilmington NC
Ph: 910-772-5793
Fax: 910-772-5796
Steve Schapel said:
Paul,

Here's one idea...
Make a new table, one field (date/time data type), one record (start it
off with today's date).
Make an Update Query to update the date field in this table to today's date.
In your import macro, put an OpenQuery action to run this Update Query
(after you have it working correctly, you will want to also put a
SetWarnings,No action before the OpenQuery, to suppress the display of
the action query confirmation messages).
In the Condition of the macro actions, put the equivalent of...
Date()>DLookup("[YourDateField]","YourDateCheckTable")

--
Steve Schapel, Microsoft Access MVP

I want to automatically run an import on a daily basis. But I only want it
to run the first time the database is opened on that day. Any idea how I can
create an Autoexec macro to only run if it has not run on that day?

I already have the import macros working, just need to run them only once
per day.
 

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