Timer

The Timer event occurs when the form is opened. The duration of this event is determined by the value (milliseconds) entered in the TimerInterval property located on the Event tab of the form's property sheet. Use this event to display

Event Programming in Forms and Reports a splash screen when the database is opened. The Timer event is helpful in limiting the time the record remains locked in multi-user applications.

The event procedure in Hands-On 24-20 will flash the button's text, "Preview Product List" (or the entire button if you use the commented code instead). For the code to work you must start the timer by changing the Timerlnterval property from 0 (stopped) to the desired interval. A timer interval of 1,000 will invoke a timer event every second. The form's Load event procedure sets the form's Timerlnterval property to 250, so the button text (or the entire button) is toggled once every quarter second.

You may change the timer interval manually by typing the value next to the form's Timerlnterval property in the properties sheet or by placing the following statement in the Form_Load event:

Me.TimerInterval = 250

0 0

Post a comment