Hi,
I've got a main form with some unbound fields and a subform. From the unbound fields in the mainform, I modify dynamically the RecordSource of my subform to display the information. ==> This works fine !!
When there is no information to display in my subform, I need to create a new record in my subform and populate automatically some of the fields in my subform.
The problem is that I am not able to use the GoTorecord,, acnewrec in the subform because Access tells me that the subform is not open. If I try to use the Openform command, I get a new subform window on the screen and that's not what I want because the subform is already displayed.
Here is part of the code:
DoCmd.OpenForm "Subform name"
DoCmd.GoToRecord acDataForm, "Subform name", acNewRec
Cheers.
Fab.
I've got a main form with some unbound fields and a subform. From the unbound fields in the mainform, I modify dynamically the RecordSource of my subform to display the information. ==> This works fine !!
When there is no information to display in my subform, I need to create a new record in my subform and populate automatically some of the fields in my subform.
The problem is that I am not able to use the GoTorecord,, acnewrec in the subform because Access tells me that the subform is not open. If I try to use the Openform command, I get a new subform window on the screen and that's not what I want because the subform is already displayed.
Here is part of the code:
DoCmd.OpenForm "Subform name"
DoCmd.GoToRecord acDataForm, "Subform name", acNewRec

Cheers.
Fab.