Msaccess.exe Running in the Task Manager

T

Theresa

We have a database that contains a number of macros that are scheduled to
execute through Scheduled Tasks each evening. A task is setup that opens the
Access database, executes the macro and then closes the database (both with a
CloseDatabase command and a Quit). We have found that there are instances of
msaccess.exe being left running in Task Manager even though it appears that
the database has closed and properly run the macros. The macros that are
being run contain append, update and delete queries, transferspreadsheets
commands, etc. Does anyone have any suggestions on what we might look at to
determine why the msaccess.exe process is not being closed?
 
A

Albert D. Kallal

Does anyone have any suggestions on what we might look at to
determine why the msaccess.exe process is not being closed?

If some type of error, or even some type of "prompt" that requires a
response to a question pops up, you are very much in trouble at that point
since "no person" can then answer that prompt or dialog box.

If you automation a copy of ms-access to launch, run and then shutdown then
I STRONGLY suggest that you ensure NO startup forms or startup code
runs.....

The windows script I use is

dim accessApp
set accessApp = createObject("Access.Application")
accessApp.OpenCurrentDataBase("C:\some path name\someMdb.mdb")

accessApp.Run "TimeUpDate"
accessApp.Quit
set accessApp = nothing

Make sure if you have any "recordset" procesing code, you both close and
kill the reocrdset

eg:

rst.Close
set rst = nothing.

So check for any startup code, autoexec macro or any start forms and remove
"all" of those. Using the
application.quit as above should shut down ms-access correctly. However, as
mentioned any
time of un-handled error or "stray" prompt in your code likely means
ms-access is now
waiting for user input, and thus access will not shutdown correctly.

So make sure your error handling code is more robust then normal...
 
T

Theresa

Thanks very much. We do have an autoexec macro that runs all the action
queries we need to run, so it must be, as you say, the fact that it is
waiting for user input, although we're not sure what that may be. More
investigation. Thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top