Link to home
Start Free TrialLog in
Avatar of mlcktmguy
mlcktmguyFlag for United States of America

asked on

Scheduled execution

I remember reading that it was possible to initiate Access from a batch file using startup parameters but I really don't know anything else about it.

I have a production MDE that is used by the client every day.  It is set up with an autoexec macro that performs some housekeeping and then opens the main screen/ menu of the application.  

When I setup my scheduled process I would probably want the MDE to open and automatically run a certain function rather than the 'autoexec' macro.   Is it possible to override the execution of the autoexec?

I have a process that I would like to schedule to run every evening on my client server.  They would set up the task on a scheduler and suggested that I set up a batch file to initiate the process.

What would the line that initiates Access from the batch file look like?

Any help would be appreciated.
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BTW, if you watch that section closely, you might catch the one mistake I made in that presentation; when I was trying to show the short cut properties in talking about /CMD, I did an edit instead<g>  

Served me right for trying to bounce back and forth between the script and what I was doing on screen.

Jim.
@Scott,
Using the /x option to open Access to run a macro bypasses the AutoExec macro.
Avatar of mlcktmguy

ASKER

I have been doing some testing in Access 2003 today based on the responses above.

In my testing with the /X option, it does not suppress the autoexec from running.  

The Autoexec runs, then my specified macro runs.
@Pat,
No it doesn't. I just tested it. The macro indicated by the command line does run, but the AutoExec macro runs also.
@Scott,
That's scary.  What version are you using?  I'll check A2010 when I get home.
Excellent, thanks