D
DontKnow
Hi Guys,
I need help in showing the timer value to a text box as well the user can
still operate a form within the database, whilst the counter is counting down.
Here is my code for the Timer: (from the F1 menu)
Private Sub Alarm()
Dim PauseTime, Start, Finish, TotalTime
If (MsgBox("Press Yes to pause for 5 seconds", 4)) = vbYes Then
PauseTime = 20 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
'DoEvents ' Yield to other processes.
Finish = Timer
TotalTime = Finish - Start
Me.Text30 = Fix(TotalTime) ' unable to see the value
Loop
Finish = Timer ' Set end time.
TotalTime = Finish - Start ' Calculate total time.
MsgBox "Paused for " & TotalTime & " seconds"
Else
End
End If
End Sub
The problem here is that the user cannot see the value in the text box as it
is operating too fast, as well as the timer has the focus you cannot use he
dataabase until the timer is completed/finished.
(I can see the value if I step through using the F8 key!)
Any suggestions would be invaluable!!
Many thanks in advance!!
Cheers,
I need help in showing the timer value to a text box as well the user can
still operate a form within the database, whilst the counter is counting down.
Here is my code for the Timer: (from the F1 menu)
Private Sub Alarm()
Dim PauseTime, Start, Finish, TotalTime
If (MsgBox("Press Yes to pause for 5 seconds", 4)) = vbYes Then
PauseTime = 20 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
'DoEvents ' Yield to other processes.
Finish = Timer
TotalTime = Finish - Start
Me.Text30 = Fix(TotalTime) ' unable to see the value
Loop
Finish = Timer ' Set end time.
TotalTime = Finish - Start ' Calculate total time.
MsgBox "Paused for " & TotalTime & " seconds"
Else
End
End If
End Sub
The problem here is that the user cannot see the value in the text box as it
is operating too fast, as well as the timer has the focus you cannot use he
dataabase until the timer is completed/finished.
(I can see the value if I step through using the F8 key!)
Any suggestions would be invaluable!!
Many thanks in advance!!
Cheers,