The link between the Master
form and the Slave
subform form is independent of the various controls on the form. As you know, if you go to the Form Properties
for the Slave
subform you will see blanks to populate with this information regardless of whether there are controls on the forms that display those fields on the forms.
As for best practices, this is what I find most functional: be very careful of the situations when you allow the user to change the fields that are used as the link between the forms. That can result in unexpected behavior: a row in the subform will disappear when reloaded (because the child field was changed, etc).
The Master
field also should be pre-populated, before you open the form, or else you might wind up with a similar situation, where the Slave
or Child
field will not be automatically updated with the linking data, but will have other information if you enter it, which subsequently will not be displayed with the same master form. Generally, if you are not extensively enforcing the integrity of the relationship through Macros
, the Master
field should be a Auto Inrement
Primary Key
, and the Slave
or Child
field should be made unavailable to be modified in the context of the form (meaning there is no control that displays it, or that control is not Enabled
).
(if this answers your question, please accept the answer by clicking the check () to the left)