Well, if you have a field in the sub form that is unique for each record, for example a primary key, this is simple. Let's say the name of that field is ID. Then you can from the main form use the expression subformcontrol.Form.ID.Value to determine the active record in the sub form.
If you want a command button on each row in the sub form to select that record, then have that command button write the ID to the forms tag: Form.Tag=ID.Value. Then, when you want to get this value from the main form, use subformcontrol.Form.Tag
Hope this helps.