Set up a schedule for running macro automatically
Hello Every one,
I have to set up a schedule (Access 2007) for running macro every day. I wrote this code in my main form, but it didn't work. please help!
Private Sub Form_Current()
If Time > "19:05:00" And Time < "19:10:00" Then
Dim stDocName As String
stDocName = "Report_1"
DoCmd.RunMacro stDocName
DoCmd.Close acMacro, stDocName
End If
End Sub
Thanks,
Cindy
|