I have a mainform whose data source is linked to a table called 'PARENT'
I have a subform whose data source is linked to another table called 'CHILD'(in the Database Window->Forms) and named as subFrmChild
The records in the parent and child are linked together.
I have a button in the main form that would find a record in the main form, and add a new record in the subform.
I am having trouble adding new record in the subform with codes like the following:=
This gives me an error saying that the form "child" is not open!
I tried replacing "child" by "subFrmChild", and then it gives me a similar error.
or
doesn't work either with or without the ""
Any suggestions as to how to do what I want to do?
I have a subform whose data source is linked to another table called 'CHILD'(in the Database Window->Forms) and named as subFrmChild
The records in the parent and child are linked together.
I have a button in the main form that would find a record in the main form, and add a new record in the subform.
I am having trouble adding new record in the subform with codes like the following:=
Code:
DoCmd.GoToRecord acDataForm, "child", acNewRec
This gives me an error saying that the form "child" is not open!
I tried replacing "child" by "subFrmChild", and then it gives me a similar error.
Code:
Forms!Parent!subFrmChild
Code:
Forms!Parent!child
Any suggestions as to how to do what I want to do?