Guest_imported
New member
- Jan 1, 1970
- 0
I need to run some macros which update our database. The problem is the macros need to run in the middle of the night when everyone is out of the database and no transactions are taking place. Is there a way that I can set some code to fire off a DoCmd.RunMacro at 4:00 in the morning. An API call maybe????
I have come up with this solution:
Sub Run_Macro()
Dim oApp As Object
Set oApp = CreateObject("Excel.Application"
If oApp.Wait(Now + TimeValue("0:12:00") Then
Application.DoCmd.RunMacro "WAMU Daily Statistics Update"
End If
End Sub
Here I have created an instance of Excel just so I can use the "Wait" Method.
Obviously this is a pretty tacky solution and does not sufficiently address the problem. Any Suggestions???
Please Help
jzcomputer
I have come up with this solution:
Sub Run_Macro()
Dim oApp As Object
Set oApp = CreateObject("Excel.Application"
If oApp.Wait(Now + TimeValue("0:12:00") Then
Application.DoCmd.RunMacro "WAMU Daily Statistics Update"
End If
End Sub
Here I have created an instance of Excel just so I can use the "Wait" Method.
Obviously this is a pretty tacky solution and does not sufficiently address the problem. Any Suggestions???
Please Help
jzcomputer