Hi everyone,
I would like to know;
How can I add a record to a subform from a parent form?
This is I have a button in the main form that adds a new record in the main form. Easy enough.
But whenever I try to do it so it will add the new record to the subform it gives me this;
The object 'frm phones sub' isn't open
Here is what I'm using
Private Sub btn_addnew_Click()
On Error GoTo Err_btn_addnew_Click
If Me.tab_form.Value = 0 Then Me.tab_form.Value = 1
DoCmd.GoToRecord acDataForm, "frm phones sub", acNewRec
Exit_btn_addnew_Click:
Exit Sub
Err_btn_addnew_Click:
MsgBox Err.Description
Resume Exit_btn_addnew_Click
End Sub
Thanks in advance,
V.
I would like to know;
How can I add a record to a subform from a parent form?
This is I have a button in the main form that adds a new record in the main form. Easy enough.
But whenever I try to do it so it will add the new record to the subform it gives me this;
The object 'frm phones sub' isn't open
Here is what I'm using
Private Sub btn_addnew_Click()
On Error GoTo Err_btn_addnew_Click
If Me.tab_form.Value = 0 Then Me.tab_form.Value = 1
DoCmd.GoToRecord acDataForm, "frm phones sub", acNewRec
Exit_btn_addnew_Click:
Exit Sub
Err_btn_addnew_Click:
MsgBox Err.Description
Resume Exit_btn_addnew_Click
End Sub
Thanks in advance,
V.