Which runs first recordsource or vba? (1 Viewer)

Djblois

Registered User.
Local time
Today, 12:12
Joined
Jan 26, 2009
Messages
598
I was thinking which runs first the recordsource or vba? Reason I am asking is I have a lot of forms that have the recordsource set to a query that uses a date variable. Then on the OnLoad event I change the variable to default to today. If the query in the recordsource runs first that means the query would run twice, initially and then again when I re-query after I change the variable. Should I start the form with a blank recordsource then add it in the onLoad event?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:12
Joined
May 7, 2009
Messages
19,246
the Form's Load event fires first.
No need to requery.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:12
Joined
Oct 29, 2018
Messages
21,555
Hi. Take a look at this link. Hope it helps...
 

Users who are viewing this thread

Top Bottom