OnEnter is triggered before load?

M

markmarko

Access 2007:
So I have a subform with a control that has an OnEnter event. I'm finding
that the event is triggered when the form is open, even before the OnLoad
event of the form is triggered.

Is this right? Sounds a little silly, so I tested with other controls in
subforms, and they too trigger before the forms OnLoad event. It's basically
rendering the OnEnter event useless, since it's triggering that code at the
wrong time.

Any thoughts?
 
L

Linq Adams via AccessMonster.com

If by

"even before the OnLoad event of the form is triggered"

you mean the OnLoad event of the MAIN form, the answer is yes. Subforms load
and their OnCurrent events fire and the OnEnter event of their first field to
receive focus fire BEFORE the main form's OnLoad event fires.
 
M

markmarko

Hmmm. Well that's surprising to me, so thank you for the explanation.

btw - is there a resource that describes the order of events?
 

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