Hi!
I have problem with my timer event.
When I click mouse button ok some key on
keyboard my event stops, wen I release button
or key it continues to run.
Why it is so? What I have to change there?
Here is my code:
Option Compare Database
Option Explicit
Dim kaza, aaa As Long
Dim sony As String
Private Sub Form_Timer() 'MsgBox when time is out
Dim Msg As String
Dim title As String
Dim style As Integer
Dim stDocName, stLinkCriteria As String
sony = sony & "*"
kaza = kaza + 1
Text68.ForeColor = rgb(0, 0, 255) 'Time line with * symbols
Text69.ForeColor = rgb(0, 0, 255)
Text68 = sony
Text69 = sony
Text42 = kaza
If kaza = 60 Then
Msg = "Your time is over"
style = vbOKOnly + vbInformation
title = "Information"
MsgBox Msg, style, title
DoCmd.Close
stDocName = "My_form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub
I have problem with my timer event.
When I click mouse button ok some key on
keyboard my event stops, wen I release button
or key it continues to run.
Why it is so? What I have to change there?
Here is my code:
Option Compare Database
Option Explicit
Dim kaza, aaa As Long
Dim sony As String
Private Sub Form_Timer() 'MsgBox when time is out
Dim Msg As String
Dim title As String
Dim style As Integer
Dim stDocName, stLinkCriteria As String
sony = sony & "*"
kaza = kaza + 1
Text68.ForeColor = rgb(0, 0, 255) 'Time line with * symbols
Text69.ForeColor = rgb(0, 0, 255)
Text68 = sony
Text69 = sony
Text42 = kaza
If kaza = 60 Then
Msg = "Your time is over"
style = vbOKOnly + vbInformation
title = "Information"
MsgBox Msg, style, title
DoCmd.Close
stDocName = "My_form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub