A
a0a349 via AccessMonster.com
I am attempting to use the below code for a scheduled db; depending on the
date/day, it is supposed to run the corresponding macro.
Now, the 1st one (weekly) is working/running.
But I set up a second scheduled task to handle the monthly macros, and
nothing happens.
Private Sub Form_Timer()
If Weekday(Date) = 2 Then
DoCmd.RunMacro "mcrRun_Data-Weekly"
If Weekday(Date) = 4 Then
DoCmd.RunMacro "mcrRun_Data-Monthly"
If Month(Date) = 3 Then
DoCmd.RunMacro "mcrRun_Data-Monthly2"
If Month(Date) = 9 Then
DoCmd.RunMacro "mcrRun_Data-Monthly1"
End If
End If
End If
DoCmd.Quit
End If
End Sub
Any thoughts?
Thanks!
Jen
date/day, it is supposed to run the corresponding macro.
Now, the 1st one (weekly) is working/running.
But I set up a second scheduled task to handle the monthly macros, and
nothing happens.
Private Sub Form_Timer()
If Weekday(Date) = 2 Then
DoCmd.RunMacro "mcrRun_Data-Weekly"
If Weekday(Date) = 4 Then
DoCmd.RunMacro "mcrRun_Data-Monthly"
If Month(Date) = 3 Then
DoCmd.RunMacro "mcrRun_Data-Monthly2"
If Month(Date) = 9 Then
DoCmd.RunMacro "mcrRun_Data-Monthly1"
End If
End If
End If
DoCmd.Quit
End If
End Sub
Any thoughts?
Thanks!
Jen