form timer (1 Viewer)

lala

Registered User.
Local time
Today, 04:52
Joined
Mar 20, 2002
Messages
741
hi, i did try researching this but probably didn't google the right words.

what happens if the form timer event is set to every minute, then it fires, procedure runs and it takes 5 minutes.

do the next 4 times get skipped or what happens?

thank you
 

vbaInet

AWF VIP
Local time
Today, 09:52
Joined
Jan 22, 2010
Messages
26,374
Execution of code is from top to bottom and in VBA it will wait until that line of code has completed, unless you're calling an external command like Shell in which case it will work independently.

So, your timer will not run until that function has completed. But it all depends on what you're doing in the function?
 

lala

Registered User.
Local time
Today, 04:52
Joined
Mar 20, 2002
Messages
741
Execution of code is from top to bottom and in VBA it will wait until that line of code has completed, unless you're calling an external command like Shell in which case it will work independently.

So, your timer will not run until that function has completed. But it all depends on what you're doing in the function?

running 40-50 queries that update QuickBooks tables. i mean only 5-10 actually update the tables, the rest get the data ready.
 

vbaInet

AWF VIP
Local time
Today, 09:52
Joined
Jan 22, 2010
Messages
26,374
The queries will complete before the next timer kicks in.

Give it a try using Debug.Print and see how it executes.
 

lala

Registered User.
Local time
Today, 04:52
Joined
Mar 20, 2002
Messages
741
Give it a try using Debug.Print and see how it executes.

perfect. but what do you mean? what will debug.print show me? won't it just display all the queries?

you're saying to put Debug.print in front of each query? or what?
 

vbaInet

AWF VIP
Local time
Today, 09:52
Joined
Jan 22, 2010
Messages
26,374
Just like you would use a Msgbox to test whether an event fires will be the same way you will use Debug.Print to see whether the Timer fires every minute before the function completely executes.

You can't use a Msgbox because it will pause execution.
 

lala

Registered User.
Local time
Today, 04:52
Joined
Mar 20, 2002
Messages
741
Just like you would use a Msgbox to test whether an event fires will be the same way you will use Debug.Print to see whether the Timer fires every minute before the function completely executes.

You can't use a Msgbox because it will pause execution.

here's where i'm confused and why i didn't think of doing this. what i thought might happen is that my function keeps on going but then a minute later, another one somewhere in the back starts going too.

so i didn't think i would see it in the present running code.

so are you saying that in Access only one code can run at a time?
 

lala

Registered User.
Local time
Today, 04:52
Joined
Mar 20, 2002
Messages
741
Thank you so much for all your answers and patience
 

Users who are viewing this thread

Top Bottom