?
Solved

Macro "running" in Task Scheduler

Posted on 2004-04-06
5
Medium Priority
?
883 Views
Last Modified: 2008-03-10
I have Windows Task Scheduler running a macro in Access that runs a couple querys and exports a csv file. It works perfect but the task scheduler says the task is still running and indeed Access stays open after the macro is done. How can I get it to close Access when the macro is done. I tried putting a close macro at the end of the macro but it doesnt work. Thanks.
0
Comment
Question by:Microbomb
[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
  • 2
  • 2
5 Comments
 

Expert Comment

by:Jeff_Marsh
ID: 10769268
Hey Microbomb,

Try putting the "Quit" action as the last action in the macro!

\|/ Jeff \|/
0
 

Author Comment

by:Microbomb
ID: 10769441
Close, that closes the Access but the Scheduler Service still says "running" and looking under Task Manager I see that MSAcces.exe is still running, even though I don't see it. I click end task and the "running" status goes away.
0
 

Accepted Solution

by:
Jeff_Marsh earned 500 total points
ID: 10769505
Hmmmm - have you tried putting the command in a batch file and scheduling the batch file instead:

runit.bat:
@echo off
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "database.mdb" /x Macro.Name

\|/ JRM \|/
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 10769653
have u tried

application.Quit

there is DoCmd.Close but I think that still leaves access with no db open, still running

0
 

Author Comment

by:Microbomb
ID: 10769778
Running it from the batch file seems to work. Strange that would do it. Thanks Jeff. You are manxx.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

770 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