Solved

Scheduler needed to run MS Access mdb macro

Posted on 2003-10-23
10
732 Views
Last Modified: 2012-06-21
Does any one know of a task schedule program  that I can use with MS Access so that I can schedule a process to run in the evening after work hours.   This task scheduler program would need to be able to open a specific MDB file and run a macro within it.

I have tried the Task Scheduler from within Windows NT but it will not allow me to specify the macro to run when the access mdb file opens.

Any Sugestions would be appreciated.

Lou
0
Comment
Question by:Lou Dufresne
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 32

Expert Comment

by:jadedata
ID: 9610145
Hey Ldufresne19!

 If you call the macro "autoexec" Access will run it on opening the mdb
 Make sure to include a final command to quit Access once it runs.

regards
Jack
0
 
LVL 54

Expert Comment

by:nico5038
ID: 9610247
You could also run the macro directly, just check perove's comment in:
http://www.experts-exchange.com/Databases/MS_Access/Q_20271651.html

Nic;o)
0
 
LVL 2

Accepted Solution

by:
dom_cath earned 150 total points
ID: 9611337
I use the following:

Either create a batch file or a VB program that will have the following in it:

MSACCESS <DBpath/DBname.mdb> /x <MacroName>

Sometimes you need to specify the full path name and directory to MSaccess.exe eg:

c:\program file\Ms Office\Office\MSAccess.exe "<DBpath/DBname.mdb> /x <Macroname>"  

Quotations important.  Then use task sheduler.

Dom
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 1

Author Comment

by:Lou Dufresne
ID: 9614192
I have tried all of the following but it will not run the specified macro.

Trial 1
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "S:\@DUFRESN\ACCESS\Lad97Master\Lad97Master.mdb /x M-Msg"

Trial 2
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "S:\@DUFRESN\ACCESS\Lad97Master\Lad97Master.mdb" "/x M-Msg"

Trial 3
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "S:\@DUFRESN\ACCESS\Lad97Master\Lad97Master.mdb" /x M-Msg

Trial 4
C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" S:\@DUFRESN\ACCESS\Lad97Master\Lad97Master.mdb /x M-Msg"

Any Suggestions?

Lou
0
 
LVL 32

Assisted Solution

by:jadedata
jadedata earned 100 total points
ID: 9614612
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" S:\@DUFRESN\ACCESS\Lad97Master\Lad97Master.mdb /x M-Msg

try the above:
  Only the segment pointing to msaccess.exe needs the double quotes because of the space in "Microsoft Office"
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9615476
thanx for the question!!
0
 
LVL 54

Expert Comment

by:nico5038
ID: 9615505
Hmm, exactly the command stated by perove in the Q I referenced......

Nic;o)
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9615531
Ldufresne19: did you check the link Nico provided??
0
 
LVL 1

Author Comment

by:Lou Dufresne
ID: 9618621
nico5038,
    You are right. How can I also give you some points.

Lou
0
 
LVL 54

Expert Comment

by:nico5038
ID: 9618875
Hi Lou,

I was just surprised you didn't notice, as it could have solved your problem a day sooner :-)

Success with your application !

Nic;o)

BTW Points are no issue for me as I've got plenty.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
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…

821 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