Order of events for database objects

A

Atlas

Digging on the net I've the following article:
http://office.microsoft.com/en-us/assistance/HP051867611033.aspx
That explains object by object how events occur.
Unfortuantelly it doesn't explain how events flow when those objects are
mixed together like when a form contains controls and records, and this
makes things harder.
In my case I have a form with a subform and the form recordsource and the
subform recordsource are set programmatically on the main form Open event.
Dunno why as soon as the recordsource property is set, the Beforeupdate in
the subform is fired up!!! All by it self.
That's why I'm looking for a good example of event flowing.

Any help appreciated
 
A

Allen Browne

Typically, Access loads the subform before the main form. It is normal for
the Current event to fire, possibly more than once in the subform with what
you are doing. However, its BeforeUpdate event will not fire unless you have
some code that is dirtying the record. Form_Current would be the first place
to look to find that.

If you are setting the RecordSource of the main form and subform, you
probably need to set the LinkMasterFields and LinkChildFields property of
the subform as well, as Access is liable to assign whatever it feels like
after the subform's RecordSource or SourceObject is reassigned.
 

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