Why my macro cant close the Access

amator

Registered User.
Local time
Tomorrow, 01:17
Joined
Aug 1, 2006
Messages
23
Hi
I have maded a simple macro which completes query which makes a new table. After that the macro saves the changes and closes the Access. Everythig works fine when I complete the macro from the desktop icon.

But when I try to complete the macro from Windows scheduled task (in every three minutes) the macro cant close the Access. Macro completes the query fine but then it says that it cant close the Access because of some module uses OLE or DDE. (I have not ever made any modules in my database) And after that Access claims that Access try to complete DoCmd object and you choose cancel... So what does that mean?
I have only maded a simple macro which runs query and close the Access so why it claims like that? And why the macro works when I starts it myself (from desktop icon)? So how I can get my macro to work from Windows scheduled task?
 
I have my AUTOEXEC macro do one thing only, call another MACRO.
That MACRO does all the work, and runs a QUIT with SAVE ALL at the end.
Works just fine that way.
 
Thanks FoFa. I got it work now:)
 
Solution didn't work for me

I have the same problem, but creating a macro that only called a macro that does everything didn't work for me. I kept getting the same error. Here's what I'm doing:

I created a macro that basically calls a subroutine in some VB code that does the following:
-runs a query
-sends emails to all email addresses in that come up in the recordset
-closes Access

Now running the macro alone works flawlessly, but when i use Windows Scheduler to run the macro, the error that amator was getting. I tried the solution that he said worked for him, but I'm getting the same error. I even tried to run the DDETerminateAll command immediately before the VB code tries to close Access.

Can anyone help me????
 

Users who are viewing this thread

Back
Top Bottom