Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / October 2007

Tip: Looking for answers? Try searching our database.

Scheduled Macro hanging

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kayda - 19 Jun 2007 18:44 GMT
Hi:

I have an Access 2003 macro running on a Windows 2003 server box. I am
logged into the box as Administrator. The macro runs fine when I run
the shortcut to the macro manually by clicking on it. However, when I
schedule it, it shows in the task scheduler window as "running" and
doesn't finish. I scheduled the task to run using the same
Administrator user. Also, I ensured no pop up would come by disabling
the Tools Options Edit/Find prompts, and set the macro security to
"low". As I said, when I run it manually it runs fine with no prompts.

The macro only queries a table and does a few appends, and then closes
access using "Quit". Any ideas why it might be hanging?

Thanks,
Kayda
Kayda - 21 Jun 2007 06:22 GMT
Actually, I have found that it stays in "running" state because, even
though I issue a "Quit" in the Access macro, if I look at Task Manager
the "MSACCESS.EXE"  is still loaded in memory using 0 CPU. If I delete
the scheduled task and schedule again it creates a second msaccess.exe
process. It seems to work every time, as long as I create a new task--
if I just edit the properties of the scheduled task to move up the
time to get it to run again--it doesn't work then.

Has anyone experienced this? How do I ensure the MSACCESS process is
killed every time?

Thanks,
Kayda
Kayda - 21 Jun 2007 13:59 GMT
My solution here is to get rid of the "Quit" command in the macro and
instead run a simple batch file I created with the following line:

TASKKILL /F /IM "MSACCESS.EXE"

I can be pretty sure no one else is running Access on the machine,
otherwise I imagine I would have to figure out the PID and kill the
process that way. I just call the accesskill.bat from the macro and
that seems to work. I'm curious if anyone else has had to use the
approach?
David S - 24 Jul 2007 22:04 GMT
I have a similar situation where we are trying to run a Module via Task
Sceduler.  If we log onto the server with an account with domain admin
privileges, the task will run and complete as intended.  If we schedule the
task with the same account, it will start and then hang similar to what you
were seeing on your situation.  In looking at Task Manager, there are two
instances of MSACCESS, which seems to be appropriate.  The main difference is
that short of logging onto the server, we can't get this task to run via the
scheduler.

We were thinking it was an issue with Access interacting properly with the
OS somehow.  Haven't found a solution yet though.

> My solution here is to get rid of the "Quit" command in the macro and
> instead run a simple batch file I created with the following line:
[quoted text clipped - 6 lines]
> that seems to work. I'm curious if anyone else has had to use the
> approach?
Raymond - 18 Oct 2007 20:56 GMT
I had a similar problem and I created a macro that would do what I wanted and
then I exported the macro as a shortcut to my desktop (or whereever the task
scheduler is pointing) and I would point the scheduler directly to the macro
and the macro would execute fine.

Raymond

> My solution here is to get rid of the "Quit" command in the macro and
> instead run a simple batch file I created with the following line:
[quoted text clipped - 6 lines]
> that seems to work. I'm curious if anyone else has had to use the
> approach?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.