This syntax should work from anywhere:
myVariable = forms![form name here].[subform control name here].Form.[control name here]
The control name would be the one that contains your record id (which normally you don't show to users)
In some cases you can simplify that code, but it depends on where the action is being run from.
EDIT - I removed a statement that might have referred to a method that doesn't exist. Will have to check it out.
EDIT2 - OK, there is a double click event for a form that works on a subform record. For a moment I was thinking that a form with controls can't take the focus and that might matter. I'm not using Access enough to stay on top of things.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.