Solved

Automatically running a macro daily, without user intervention

Posted on 2003-12-01
4
1,018 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 250 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

728 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