Task scheduled to execute macro?
Thank you for taking the time to report an issue.
What's wrong... Please write below.
"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" file.mdb /x Import /nostartup
The macro is executed correctly but I see always that access window starts, even if I use /nostartup command. How is possible?
the second problem is about what happens when the macro gives an error.
I would like that in every case msaccess process is killed. This macro is scheduled in windows task, so every morning when I open task manager, I see a lot of msaccess.exe processes.
So I would like to know how to force the killing of access process when the work is ok but also when it's not ok. Now I use the "Quit" command inside macro. I see also a lot of other commands but I don't know which is better to use
last thing: is it possible to wite the result of the macro executed by access in a log file? If not how can I know if the macro is ok or not
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 know I can create the outlook task from a Saved Export, this macro also has to run the query that has a user inputted date parameter.
I'm trying to automate the running of the query during the night.
I've tried a couple of ways to schedule the task with Windows Task Scheduler, although each time, it appears to start the job, but then just hang (task never completes, doesn't run the queryor macro and when I log back into Windows, the msaccess.exe process is running).
Methods I've used are:
Access 2003 SP2
Windows Server 2003, Standard Edition
Certificates are not being used
Using Task Scheduler to run an Access database macro with my credentials poses no problem, once the security is set low.
SA is a network domain service account beloging to the Local Admin group on the server. The account does not have interactive log in capabilities. To test, HKLM had the missing security key created (Level) with a value of 1 (low). The jet key "Sandbox" already existed and had a value of 2.
When the scheduled task runs the database fails to open, which suggests there is still a pop-up (macro security?) window waiting for a response.
PS. If anyone doesn't know how to schedule a database open a thread and I will show you one (cheap way) to set it up
Static intCounter As Integer
Private Sub Form_Timer()
If intCounter > 1 Then
Me.TimerInterval = 0
intCounter = intCounter | 1