There should be "Link Child Fields", and "Link Master Fields" properties for your subform control. These should match up the key fields on your master and child forms.
If the user is changing control values, and you want the appropriate subforms to appear/disappear, or requery, then use the...