I wasn't able to schedule a macro using the windows scheduler. When I schedule it, I get an error saying 'RunMacro was canceled'. Below is the macro converted to VB. Any help or comments is greatly appreciated. The same macro runs fine in access 2003 but not in access 2007. Thanks in advance.
And are there anyway to automatically schedule this VB using windows scheduler?
Option Compare Database
'------------------------------------------------------------
' Pub_Emails_Load_Macro
'
'------------------------------------------------------------
Function Pub_Emails_Load_Macro()
On Error GoTo Pub_Emails_Load_Macro_Err
DoCmd.SingleStep
DoCmd.SetWarnings False
DoCmd.OpenQuery "Delete Query", acViewNormal, acEdit
DoCmd.Close acQuery, "Delete Query"
DoCmd.SetWarnings True
DoCmd.Quit acExit
Pub_Emails_Load_Macro_Exit:
Exit Function
Pub_Emails_Load_Macro_Err:
MsgBox Error$
Resume Pub_Emails_Load_Macro_Exit
End Function
Bookmarks