Avatar of mlcktmguy
mlcktmguy
Flag 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.
Microsoft Access

Avatar of undefined
Last Comment
mlcktmguy

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
PatHartman

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Scott McDaniel (EE MVE )

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Jim Dettman (EE MVE)

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.
PatHartman

@Scott,
Using the /x option to open Access to run a macro bypasses the AutoExec macro.
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.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Scott McDaniel (EE MVE )

@Pat,
No it doesn't. I just tested it. The macro indicated by the command line does run, but the AutoExec macro runs also.
PatHartman

@Scott,
That's scary.  What version are you using?  I'll check A2010 when I get home.
mlcktmguy

ASKER
Excellent, thanks
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.