Automatically running a macro daily, without user intervention

I have a secured Access XP front-end to a FoxPro database on an internal switched ethernet network.  I need to run a macro daily at 11:50 PM.  The macro's built and tested. Does anyone know how to kick it off, without user intervention?  Both the Access and the FoxPro databases are secured. Will the security settings need to be considered when automatically running the macro?

DKJensenAsked:
Who is Participating?
 
TextReportConnect With a Mentor Commented:
On your server you can schedule a process to run at 23:50 the process can run MSACCESS.EDXE and tell the system to execute your macro, you will however need to pass the USERNAME and PASSWORD from the command line.

"C:Program Files\Microsoft Office\Office\MSACCESS.EXE" "c:\MyDatabase.MDB" /WRKGRP "C:\My.MDW" /USER username /PWD mypassword /x mymacro

Cheers, Andrew
0
 
syntnxCommented:
DK,

I personally would set-up a separate Access frontend with the security set-up and macro created, Then just use the windows schedule service to open the DB at the specific time. Even if database has credentials saved, just dont share that copy out. You can run the task for a scheduled time frame and then it will close.

Hope this helps

syntnx
0
 
DKJensenAuthor Commented:
Thanks, Andrew - I'll give it a go.
0
 
sph3rionCommented:
To have a macro auto-run when you open the DB, or it gets executed by a scheduler... name the macro 'autoexec'.

Just thought I'd toss that in there as well
0
All Courses

From novice to tech pro — start learning today.