TimerInterval not working

C

caris111hk

I have an access db application which needs to call the macro on
startup. The macro is to call the function opening two forms on
startup and set the TimerInterval of two forms.

Public Function auto_login()


DoCmd.OpenForm "frm_A"
Forms![frm_Import&Export].TimerInterval = 300000
DoCmd.OpenForm "frm_B"
Forms![frm_TREATS_ftp].TimerInterval = 120000


End Function


However only the Timer for form B (at the toppest) works. It works
for form A but not B if I open form B first and then A later. Is
there any way to solve the problem?


Regards
Caris
 
R

Richard

Hi Caris

What I will do is get the macro to open form A.

Create the Timer Interval at the on open event of the forms and on form A,
open Form B

Hope it helps
Richard
tina said:
please don't multi-post. for more information, see
http://home.att.net/~california.db/tips.html#aTip10

hth


I have an access db application which needs to call the macro on
startup. The macro is to call the function opening two forms on
startup and set the TimerInterval of two forms.

Public Function auto_login()


DoCmd.OpenForm "frm_A"
Forms![frm_Import&Export].TimerInterval = 300000
DoCmd.OpenForm "frm_B"
Forms![frm_TREATS_ftp].TimerInterval = 120000


End Function


However only the Timer for form B (at the toppest) works. It works
for form A but not B if I open form B first and then A later. Is
there any way to solve the problem?


Regards
Caris
 
G

Guest

Why not just set the Timer Interval property in design view of each form?
--
Dave Hargis, Microsoft Access MVP


Richard said:
Hi Caris

What I will do is get the macro to open form A.

Create the Timer Interval at the on open event of the forms and on form A,
open Form B

Hope it helps
Richard
tina said:
please don't multi-post. for more information, see
http://home.att.net/~california.db/tips.html#aTip10

hth


I have an access db application which needs to call the macro on
startup. The macro is to call the function opening two forms on
startup and set the TimerInterval of two forms.

Public Function auto_login()


DoCmd.OpenForm "frm_A"
Forms![frm_Import&Export].TimerInterval = 300000
DoCmd.OpenForm "frm_B"
Forms![frm_TREATS_ftp].TimerInterval = 120000


End Function


However only the Timer for form B (at the toppest) works. It works
for form A but not B if I open form B first and then A later. Is
there any way to solve the problem?


Regards
Caris
 
G

Guest

What do you have in the timer event? How do you know it is not working? It
is more likely the code in the timer event is not doing what you expect.
 
C

caris111hk

What do you have in the timer event? How do you know it isnotworking? It
is more likely the code in the timer event isnotdoing what you expect.

I know it's not working because I will write the message to log when
the event start. but it does not write anything.

Caris
 
G

Guest

Try putting a message box in the Timer event. That will really tell you
whether the event is firing or not.
 
C

caris111hk

Try putting a message box in the Timer event. That will really tell you
whether the event is firing ornot.

Thx. I have tested it already. The event does not fire at all. So I
don't know why it's not firing even I set the TimerInterval in both
Design view and the code
 
D

Douglas J. Steele

Thx. I have tested it already. The event does not fire at all. So I
don't know why it's not firing even I set the TimerInterval in both
Design view and the code

Look at the properties of the Form. (Be careful that you're looking at the
properties of the Form, not of a section of the form or a control on the
form.)

What do you have as the value for the property of the On Timer entry? Make
sure it's [Event Procedure].
 
C

caris111hk

Look at the properties of the Form. (Be careful that you're looking at the
properties of the Form,notof a section of the form or a control on the
form.)

What do you have as the value for the property of the On Timer entry? Make
sure it's [Event Procedure].

Yes it's [Event Procedure]
 

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