Access 2000 move to a new record on a subform.

M

Mark

We have an form with a sub form and I want to make the current record be a
new record on the sub form. The catch is I need to do this from a third form.
The question is how do I reference the sub form and make the code:

DoCmd.GoToRecord acDataForm, "Form_orderdetails", acNewRec

work correctly.
I am already able to change the data in the fields on the sub form with out
any problem. (Form_orderdetails!Grade = Me!Grade)
I would appreciate any suggestions you may have.
Thanks in advance.
 
K

Ken Snell [MVP]

It'll be easier if you use a completely different approach. Let's tell the
recordset of the subform to start a new record:

Forms!MainFormName!SubformControlName.Form.Recordset.AddNew

where SubformControlName is the name of the subform control (the control
that holds the subform object).
 
Top