arage
08-01-2001, 07:18 AM
I’ve never used subforms before & am trying now.
My subform is based on several table fields and the main form’s record source is the entire table. The form has a 2 unbound controls, Ref# and Invoice#. What I’m attempting to do is fill in either of the latter controls and then use a Goto record command that will take me to the appropriate record in the subform. I’ve never used the latter goto command before either & would appreciate any advice on how to approach this problem.
I’m using the above to update accounting details, I search by Ref# or Invoice#, then goto the appropriate subform record (which lists accounting details) and then fill in the accounting fields.
Here’s a sample of the code I put in the afterUpdate event of my Ref# control. The error I get is that the ‘tblNewMainCopy subform’ object is not open. Run time error 2489.
Private Sub txtReference__AfterUpdate()
DoCmd.GoToRecord acDataForm, "tblNewMainCopy subform", acGoTo
End Sub
My subform is based on several table fields and the main form’s record source is the entire table. The form has a 2 unbound controls, Ref# and Invoice#. What I’m attempting to do is fill in either of the latter controls and then use a Goto record command that will take me to the appropriate record in the subform. I’ve never used the latter goto command before either & would appreciate any advice on how to approach this problem.
I’m using the above to update accounting details, I search by Ref# or Invoice#, then goto the appropriate subform record (which lists accounting details) and then fill in the accounting fields.
Here’s a sample of the code I put in the afterUpdate event of my Ref# control. The error I get is that the ‘tblNewMainCopy subform’ object is not open. Run time error 2489.
Private Sub txtReference__AfterUpdate()
DoCmd.GoToRecord acDataForm, "tblNewMainCopy subform", acGoTo
End Sub