Automated Daily Import

  • Thread starter Thread starter Racer57
  • Start date Start date
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
 
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")
 
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.
 
Back
Top