Open Subform add New Record

fenhow

Registered User.
Local time
Yesterday, 19:59
Joined
Jul 21, 2004
Messages
599
Hi, I have a main form with a pop up subform. It is a one to many relationship.

I have this code to open the subform "DoCmd.OpenForm "frm_ACQ_Acquisition", , , "BTID = " & Me.BTID" and it works great.

Now on the subform, I want to create a new record but keep it under the main form. How can I keep the BTID with the new record, when I add a new record using this code the BTID is blank...

DoCmd.GoToRecord , , acNewRec
Me.BTID = frm_ACQ_Batch.BTID

Thanks.
Fen
 
How can it be a pop up and a subForm?
It's one or the other.
Or do you mean, a pop up,with master/child?
 
You could use the open arguments, "OpenArgs" and set the Default value for the control "BTID" equal to the "OpenArgs" in the form's Open/Load event.
 

Users who are viewing this thread

Back
Top Bottom