Solved

Scheduler needed to run MS Access mdb macro

Posted on 2003-10-23
10
727 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
 
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

706 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

17 Experts available now in Live!

Get 1:1 Help Now