?
Solved

Scheduler needed to run MS Access mdb macro

Posted on 2003-10-23
10
Medium Priority
?
745 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 600 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 400 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

831 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