Solved

Macro "running" in Task Scheduler

Posted on 2004-04-06
5
871 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
  • 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 125 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

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)

Join & Write a Comment

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…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

762 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

21 Experts available now in Live!

Get 1:1 Help Now