macro

J

Joel Allen

Hello,

I need to run a macro every hour but don't know how. My goal is to just
have this macro run every hour, but not have to have the database open. If
I have to have it open, then fine, but I'd rather not.

Thanks for your help,
Joel
 
S

Steve Schapel

Joel,

If the application is open, you can have a form (hidden, perhaps), whose
Timer Interval property is set to 3600000 (milliseconds in an hour).
Then you can assign the macro on the Timer event of the form.

If the application is not open, you will need to use Windows Task
Manager, or some third-party scheduling utility, to run a scheduled
task. The Command Line of the scheduler will proabably look like this...
"C:\Program Files\Miscrosoft Office\Msaccess.exe"
"C:\YourFolder\YourDb.mdb" /x NameOfMacro
 
J

Joel Allen

Thanks. When I go to Windows Task Magager, I don't see any options for
scheduling tasks like that or a Command Line. Can you please help me just a
little further?

Thanks,
Joel
 
S

Steve Schapel

Joel,

With Windows XP Pro, you can do like this...

1. Start=>All Programs=>Accessories=>System Tools=>Scheduled Tasks
2. Right-Click=>New=>Scheduled Task
3. Double-Click 'New Task', and set properties as required - Command
Line as mentioned before goes in "Run" box.
 
J

Joel Allen

I put this line in ther and it said it could not run it. Do you see
aproblem with the syntax perhaps?

"C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft
Office\Microsoft Office Access 2003.lnk""W:\Company Documents-Public\PM
Department\PMTool Web Link\PMTool_Web_Access.mdb\MakeTable"

Thanks again,
Joel
 
S

Steve Schapel

Joel,

Yes, there are a numberr of problems here...

As per my original example:
1. The application has to point to the Access executable, not a
shortcut icon, which is what you appear to have done.
2. There has to be a space between the two components of the command line.
3. You need to use the /x switch to indicate the macro.

So, something like this...
"C:\Program Files\Microsoft Office\Office11\Msaccess.exe" "W:\Company
Documents-Public\PM Department\PMTool Web Link\PMTool_Web_Access.mdb" /x
MakeTable
 

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