I am trying to create my own msgbox to Popup and display decreasing numbers: 10 , 9, 8, 7,.....and when it reaches
Zero the Application closes the following is the code I have written so far but, no joy. any help would be apreciated. (timer interval = 1000)not sure if it's right
have not worked out the display of numbers to coinside with the countdown yet.. trying to get the timer to count
and close first.
here's the code so far:
Private Sub Form_Open(Cancel As Integer)
Call Form_Timer
End Sub
Private Sub Form_Timer()
On Error GoTo Err_Form_Timer
' Enable security to allow manager or developer to stay "UP".
Set GlobalProps = GlobalProperties
If GlobalProps.CurrentUser = "Manager" Or "developer" Then
GoTo Form_Timer_Exit
Else
End If
' CountDown determines how much time to wait before
' running the Countdwon close subroutine.
Const CountDown = 10
Static CountDownTime
Dim CountDownSeconds
CountDownTime = CountDownTime + Me.TimerInterval
' Does the total expired time exceed the CountDown?
CountDownSeconds = CountDownTime / 1000
If CountDownSeconds >= CountDown Then
' ...if so, then reset the expired time to zero...
CountDownTime = 0
' ...and call the Countdown close subroutine.
Call ExitApp
End If
Form_Timer_Exit:
Exit Sub
Err_Form_Timer:
dbsSecurity_ErrorHandler Err.Number, Erl, Error, Me.Name, "Form_Timer"
GoTo Form_Timer_Exit
End Sub
Sub ExitApp()
On Error Resume Next
'Application.Quit (use in completed form... just close the form for now)
DoCmd.Close
End Sub
Zero the Application closes the following is the code I have written so far but, no joy. any help would be apreciated. (timer interval = 1000)not sure if it's right
have not worked out the display of numbers to coinside with the countdown yet.. trying to get the timer to count
and close first.
here's the code so far:
Private Sub Form_Open(Cancel As Integer)
Call Form_Timer
End Sub
Private Sub Form_Timer()
On Error GoTo Err_Form_Timer
' Enable security to allow manager or developer to stay "UP".
Set GlobalProps = GlobalProperties
If GlobalProps.CurrentUser = "Manager" Or "developer" Then
GoTo Form_Timer_Exit
Else
End If
' CountDown determines how much time to wait before
' running the Countdwon close subroutine.
Const CountDown = 10
Static CountDownTime
Dim CountDownSeconds
CountDownTime = CountDownTime + Me.TimerInterval
' Does the total expired time exceed the CountDown?
CountDownSeconds = CountDownTime / 1000
If CountDownSeconds >= CountDown Then
' ...if so, then reset the expired time to zero...
CountDownTime = 0
' ...and call the Countdown close subroutine.
Call ExitApp
End If
Form_Timer_Exit:
Exit Sub
Err_Form_Timer:
dbsSecurity_ErrorHandler Err.Number, Erl, Error, Me.Name, "Form_Timer"
GoTo Form_Timer_Exit
End Sub
Sub ExitApp()
On Error Resume Next
'Application.Quit (use in completed form... just close the form for now)
DoCmd.Close
End Sub