Hello guys,
My question is simple : when selection a specific item, I'd like to change the backcolor of an object during one second, then restore the original backcolor.
What is the command to pause things like that?
In Excel 2002 VBA, I used the command
Code:
Application.Wait (Now + TimeValue("0:00:02"))
But it doesn't seem to work with Access or at least with Access 2007.
In the help, I saw
Code:
Dim PauseTime, Start, Finish, TotalTime
If (MsgBox("Press Yes to pause for 5 seconds", 4)) = vbYes Then
PauseTime = 5 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
DoEvents ' Yield to other processes.
Loop
Finish = Timer ' Set end time.
TotalTime = Finish - Start ' Calculate total time.
MsgBox "Paused for " & TotalTime & " seconds"
Else
End
End If
But it seems quite complicated for what I want to do (I don't like the do while / do events).
Thank you in advance. :-)