I would like a 1 second delay in my code. Below is the code I am trying to make this delay. I think it polls the date and time off the operating system and waits until the
For MS Access: Launch a hidden form with Me.TimerInterval set and a Form_Timer event handler. Put your to-be-delayed code in the Form_Timer routine - exiting the routine after each execution.
E.g.:
Private Sub Form_Load()
Me.TimerInterval = 30000 ' 30 sec
End Sub
Private Sub Form_Timer()
Dim lngTimerInterval As Long: lngTimerInterval = Me.TimerInterval
Me.TimerInterval = 0
'
Me.TimerInterval = lngTimerInterval
End Sub
"Your Code goes here" will be executed 30 seconds after the form is opened and 30 seconds after each subsequent execution.
Close the hidden form when done.