Link to home
Start Free TrialLog in
Avatar of saab
saab

asked on

Auto run a Macro in Access 97

Hi All,

    I am using Access 97. I want to run a macro automatically once in a week. This macro delete 2 tables, create new tables and copy data from source. Is it possible in Access 97? Please tell me how to do that.

Thanks

saab
ASKER CERTIFIED SOLUTION
Avatar of nico5038
nico5038
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you name it AutoExec, it will run every time the database is opened. Is the file used between times running the macro? If so you may need to use the windows task scheduler to do this. What version of windows are you running?
As nico said you need to use some kind of scheduler to do the job automaticly. Windows shedulder sounds good for this job.

So just run this command where you starts access and tells access what MDB to open and what to do when it is open. The shortcut you put into scheduler should look something like:

c:\program files\microsoft office\office\msaccess.exe c:\myapps\MyMdb.mdb /x MyMacro

This will open access and run the macro "MyMacro". Remember to add a line -> "Quit" in the macro so that access will close down when the macro finish.

perove