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
Solved

Macro "running" in Task Scheduler

Posted on 2004-04-06
5
875 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

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…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

856 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