Form_Timer() not executing

G

Guest

Hi,

I am trying to update the time on a field in a display. I have read the
other messages and have put the following code :

Sub Form_Open
Me.Timerinterval = 1000

Sub form_Timer()
Msgbox "THIS IS A TeST" VBcritical

I never get the message so I assume the timerinterval is not working ? This
is on a switchboard form - any idea ?
 
A

Allen Browne

You probably don't want a MsgBox every second.

You don't need any code:
1. Open the form in design view.

2. Set the form's Timer Interval to 1000

3. Set the form's On Timer property to:
[Event Procedure]

4. IN the timer event:
Debug.Print Me.Name & ".Timer at " & Now()

5. Save. Open the form (not design view.)

6. Open the Immediate Window (Ctrl+G) and watch the lines printing there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top