Run Macro at set time

This code checks a database on open for the current time and if the time is between the time set in the code the database will start a macro.

This code is good for overnight updates when the database open is trigged by a schedule application.

Private Sub Form_Current MsgBox Time If Time > "14:20:00" And Time < "16:45:00" Then DoCmd.RunMacro "macro1" DoCmd.Close acMacro, "macro1" Text0 = Time End If End Sub

Code Snippits