Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two events on the same form's on timer?

Status
Not open for further replies.
Feb 19, 2005
47
0
0
GB
Is it possible to run two events on the on timer section of one form? i have tried naming both procedures Form_Timer() but when viewed in form view an error message appears which says I cannot have an ambiguous name. Any suggestions?
 
Say you want 1 event to run every 5 seconds and the other to run every 10 seconds. Set the time to run every 5 seconds. In the OnTimer event, do something like this:

Static bol10Second as Boolean

If (bol10Second) then
do 10 second stuff here
bol10Second = False
else
bol10Second = True
End if

Do 5 second stuff here
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top