[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Automatically running a macro daily, without user intervention

Posted on 2003-12-01
4
Medium Priority
?
1,032 Views
Last Modified: 2008-03-06
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?

0
Comment
Question by:DKJensen
4 Comments
 
LVL 3

Expert Comment

by:syntnx
ID: 9850666
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
 
LVL 28

Accepted Solution

by:
TextReport earned 1000 total points
ID: 9850725
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
 

Author Comment

by:DKJensen
ID: 9850970
Thanks, Andrew - I'll give it a go.
0
 
LVL 1

Expert Comment

by:sph3rion
ID: 9851301
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question