Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Scheduler needed to run MS Access mdb macro

Posted on 2003-10-23
10
Medium Priority
?
741 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 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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 …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

610 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