On a Form, how can I set a time interval between two lines of code?
To explain, here is my solution (of course, it doesn't work)
Form1 has 2 Labels (arranged to look like a traffic light) their Properties are;
LightRedLbl.Visible = False
LightGreenLbl.Visible = True
The Form Timer Interval is set to 7000
The OnTimer Event Procedure is;
LightRedLbl.Visible = True
LightGreenLbl.Visible = False
So the Traffic Light appears to turn Green to Red after seven seconds.
An AfterUpdate Event switches the Label's Visible properties back again, BUT, it rarely is seven seconds before the swap back to Red, instead, it's the remainder of seven seconds depending on the time the Update was made.
One last thing. Which is the Event Procedure which corresponds with the next record loading to the Form.
Thanks
To explain, here is my solution (of course, it doesn't work)
Form1 has 2 Labels (arranged to look like a traffic light) their Properties are;
LightRedLbl.Visible = False
LightGreenLbl.Visible = True
The Form Timer Interval is set to 7000
The OnTimer Event Procedure is;
LightRedLbl.Visible = True
LightGreenLbl.Visible = False
So the Traffic Light appears to turn Green to Red after seven seconds.
An AfterUpdate Event switches the Label's Visible properties back again, BUT, it rarely is seven seconds before the swap back to Red, instead, it's the remainder of seven seconds depending on the time the Update was made.
One last thing. Which is the Event Procedure which corresponds with the next record loading to the Form.
Thanks