Adding a new record to a subform

J

Jess

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
 
J

Jack Leach

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top