Are you just trying to set a pause for 5 seconds? I use this to pause my db so that certain commands can catch up like updating a label after a query or transfer has completed and before the next transfer begins...
Public Function Pause(NumberOfSeconds As Variant)
On Error GoTo Err_Pause
Dim PauseTime As Variant, Start As Variant
PauseTime = NumberOfSeconds
Start = Timer
Do While Timer < Start + PauseTime
DoEvents
Loop
Exit_Pause:
Exit Function
Err_Pause:
Msg Err.Number, Err.Description
Resume Exit_Pause
End Function
To call the pause in your code, just type Pause (x) on a new line. Replace the x with the number of seconds you want to pause.
Pause (5) 'five second pause
HTH