|
-
Jul 27th, 2006, 02:46 PM
#1
Thread Starter
New Member
Multiple Timers Again?
hee hee heeee....
Well I haven't found this problem on the forum yet...
I start my app with form1 which has Timer1 & Timer2 both disabled.
After doing an email inbox login with a click...it exits starting Timer1.
So Timer1 code starts running which has Timer2.Enable = True but Timer2 never starts...Whats up with that?
Thanks
-
Jul 27th, 2006, 02:56 PM
#2
Re: Multiple Timers Again?
Does Timer2 have any Interval?
-
Jul 27th, 2006, 03:00 PM
#3
Thread Starter
New Member
Re: Multiple Timers Again?
Yes...I have Timer1 @ 2000 & Timer2 @ 500..
-
Jul 27th, 2006, 03:57 PM
#4
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.
-
Jul 27th, 2006, 04:20 PM
#5
Thread Starter
New Member
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()
-
Jul 27th, 2006, 04:23 PM
#6
Thread Starter
New Member
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.
-
Jul 27th, 2006, 04:25 PM
#7
Thread Starter
New Member
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!
-
Jul 27th, 2006, 09:39 PM
#8
Re: Multiple Timers Again?
You should not need two timers on a form anyway...
-
Jul 27th, 2006, 09:56 PM
#9
Re: Multiple Timers Again?
View help with timers in my signature...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|