I believe you need to set the focus to the subform2 control (container) first:
Me.subformcontainer2.SetFocus
DoCmd.GotoRecord, , acNewRec
hth
--
Jack Leach
www.tristatemachine.com
"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
"Jess" wrote:
> I have a main form which contains a subform called subform1. Subform1
> contains another subform called subform2. The subforms container names are
> subformcontainer1 and subformcontainer2 respectively.
>
> How do I add a new record to subform2 if I am on subform1 with the docmd
> command?
>
> Thanks
>