I’m trying to write a VBA Script that will run a query or it need be Macros similar to have MS Scheduler Task works. This is what I have so far, but doesn’t seem to be working.
Anyone have some help or advice?
Thanks for taking the time
Anyone have some help or advice?
Thanks for taking the time
Code:
Private Sub Form_Timer()
On Error GoTo Err_Command34_Click
Dim stDocName1 As String
Dim SysHour, SysTime
Dim SysDay, SysDate
stDocName1 = "Performance Reporting for Manual Dates"
SysTime = time()
SysHour = Hour(SysTime)
SysDate = Date
SysDay = Day(SysDate)
If SysHour = Now Then
DoCmd.RunMacro stDocName1
End If
Exit_Command34_Click:
Exit Sub
Err_Command34_Click:
MsgBox Err.Description
Resume Exit_Command34_Click
End Sub