Solved

Scheduler needed to run MS Access mdb macro

Posted on 2003-10-23
10
734 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 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