Re: Multiple Timers Again?
Does Timer2 have any Interval?
Re: Multiple Timers Again?
Yes...I have Timer1 @ 2000 & Timer2 @ 500..
Re: Multiple Timers Again?
So what code do you have in the timers? I can only think of a mistake with code logic, but there are so many ways to go wrong that it is hard to go guessing.
Re: Multiple Timers Again?
Private Sub Command1_Click()
Dim boolRetVal As Boolean, objdelaymins As Integer
boolRetVal = True
'objSession.CurrentUser
If boolRetVal = True Then
Text2 = "Logged ON"
Timer1.Enabled = True
Timer1.Interval = 20000
Else
End If
End Sub 'Command1_Click()
*******************************
Private Sub Timer2_Timer()
newTime = Time
MsgBox "New time" & newTime
End Sub
*********************************
Private Sub Snd_Err_Email()
MsgBox "The error message has been sent!"
ErrSentSw = 1
Timer2.Interval = 500
Timer2.Enabled = True
End Sub 'Snd_Err_Email()
***********************************************
Private Sub Timer1_Timer()
objMsgCnt = 1
objMsgCntMax = 1
objMsgCnt = objMsgCnt + 1
If objMsgCnt >= objMsgCntMax Then
If ErrSentSw = False Then
Call Snd_Err_Email 'Send an error message to the list
End If
Else
'objMsg.Delete
End If
End Sub 'Timer1_Timer()
Re: Multiple Timers Again?
I've chopped most of the code out but this still won't run the Timer2 sub.
You can see that Timer1 starts a sub which sends an error email message and also then starts Timer2.
Re: Multiple Timers Again?
Damn...It just worked for me...guess I've gotta start adding stuff back a piece at a time...
Thanks for your time!
Re: Multiple Timers Again?
You should not need two timers on a form anyway...
Re: Multiple Timers Again?
View help with timers in my signature...