Error opening subform/form

L

laura

When i use an access database and open a form containing a subform, the
subform and its records are loaded before the main form as it should be.

When i use an sql server database and open a form containing a subform, the
subform and its records are NOT loaded before the main form.

Can anyone please help me?

Laura
 
A

Allen Browne

Laura, you cannot alter the way Access fires its events, so you will need to
learn to work with it.

Typcially when Access opens a form, it fires the subform's Open event before
the main form's. But that does not mean it loads the *records* of the
subform before the main form. On a typical form/subform the
LinkMasterFields/LinkChildFields properties control which records are loaded
into the subform, based on the value of the LinkMasterFields. It follows
that Access must load the main form record first (to discover the value of
the LinkMasterFields) before it can populate the subform with the related
records.
 
L

laura

Allen Browne said:
Laura, you cannot alter the way Access fires its events, so you will need to
learn to work with it.

Typcially when Access opens a form, it fires the subform's Open event before
the main form's. But that does not mean it loads the *records* of the
subform before the main form. On a typical form/subform the
LinkMasterFields/LinkChildFields properties control which records are loaded
into the subform, based on the value of the LinkMasterFields. It follows
that Access must load the main form record first (to discover the value of
the LinkMasterFields) before it can populate the subform with the related
records.
 
Top