I have a main form "Standards" with a subform (Continuous Form), "NatureofNonConformance" on a tabbed page on the main form. If Non Conformance is selected on the Main form the user is directed to the Subform. Here they enter the details of the non conformance.
I have put the follow code into the On Current event of the subform to prevent users deleting or editing previously entered details ( I cannot disable edits etc on the subform as there are other controls that need to be editable , "ActionCompleteBy")
If Not IsNull(Me!NatureofNC) Then
Me!NatureofNC.Enabled = False
Me!NatureofNC.Enabled = True
I also have a command button on the main form, to enable viewing and editing of enabled controls, which sets focus on the subform.
I would like to go to a new record on the subform to enable additional entries, however, when I use
DoCmd.GoToRecord , , acNewRec
it takes me to a new record on the main form.
Ideally I would like the command button to take me to the subform on a new record, setting focus on the "NatureofNC" control.
Where am I going wrong?