Solved

Automatically running a macro daily, without user intervention

Posted on 2003-12-01
4
986 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks, Andrew - I'll give it a go.
0
 
LVL 1

Expert Comment

by:sph3rion
Comment Utility
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now