O
Owl
I have created the following Event Procedure for On Timer (the Timer Interval
is set to 10000):
Private Sub Form_Timer()
'On the forms timer event close the start-up form
DoCmd.Close acForm, "Diana'sStartUpForm"
'Open up the main switchboard form when the start-up form closes
DoCmd.OpenForm "Switchboard"
End Sub
I have subsequently created a Pause Button called Pause This Screen with the
following Event Procedure (which I don’t understand but copied it from the
Internet and modified it where I THOUGHT it needed to be modified to pause
for 30 seconds):
Private Sub Pause_this_screen_Click()
Dim PauseTime, Start, Finish, TotalTime
If (MsgBox("Pause this screen", _
4)) = vbYes Then
PauseTime = 30000 ' 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
End Sub
My first question is: What does the _4 mean?
My second question is: What do I need to do to modify the screen to pause
for 30 seconds (because it isn't working)?
My third question is: Does that mean it will pause for 30 seconds IN
ADDITION TO – or INSTEAD OF - the original 10 seconds as set on the timer?
I have added a “Continue to Main Menu†button which overrides the pause, but
would like the pause to be long enough to make the user have control of how
much time is spent on the StartUp screen.
Thank you for any help
is set to 10000):
Private Sub Form_Timer()
'On the forms timer event close the start-up form
DoCmd.Close acForm, "Diana'sStartUpForm"
'Open up the main switchboard form when the start-up form closes
DoCmd.OpenForm "Switchboard"
End Sub
I have subsequently created a Pause Button called Pause This Screen with the
following Event Procedure (which I don’t understand but copied it from the
Internet and modified it where I THOUGHT it needed to be modified to pause
for 30 seconds):
Private Sub Pause_this_screen_Click()
Dim PauseTime, Start, Finish, TotalTime
If (MsgBox("Pause this screen", _
4)) = vbYes Then
PauseTime = 30000 ' 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
End Sub
My first question is: What does the _4 mean?
My second question is: What do I need to do to modify the screen to pause
for 30 seconds (because it isn't working)?
My third question is: Does that mean it will pause for 30 seconds IN
ADDITION TO – or INSTEAD OF - the original 10 seconds as set on the timer?
I have added a “Continue to Main Menu†button which overrides the pause, but
would like the pause to be long enough to make the user have control of how
much time is spent on the StartUp screen.
Thank you for any help