I am having problems refering to a field or control on a subform.
What I am trying to do is this:
I have a main form called [FrmItems] and 2 subforms [SubFrm1] & [SubFrm2]. Both sub forms are displayed as datasheets and on [SubFrm1] is a field or control called [ItemID]. I also have a button on the *MAIN* form that the user, (after first selecting a record in [Subfrm1]), clicks and this then runs a query.
I then want access to move to the next record in [SubFrm1] after this query has run. I have tried various combinations of refering to the [ItemID] but none of them seem to work. I keep getting error messages.
Am i doing something wrong please.
This is the two lines of code that I have after the RunQuery code:
DoCmd.GoToControl Forms!FrmItems!SubFrm1.Form = ItemID
DoCmd.GoToRecord , ItemID, acNext
Can someone help me please as I am totally stuck.
Thank you,
Kenny [sig][/sig]
What I am trying to do is this:
I have a main form called [FrmItems] and 2 subforms [SubFrm1] & [SubFrm2]. Both sub forms are displayed as datasheets and on [SubFrm1] is a field or control called [ItemID]. I also have a button on the *MAIN* form that the user, (after first selecting a record in [Subfrm1]), clicks and this then runs a query.
I then want access to move to the next record in [SubFrm1] after this query has run. I have tried various combinations of refering to the [ItemID] but none of them seem to work. I keep getting error messages.
Am i doing something wrong please.
This is the two lines of code that I have after the RunQuery code:
DoCmd.GoToControl Forms!FrmItems!SubFrm1.Form = ItemID
DoCmd.GoToRecord , ItemID, acNext
Can someone help me please as I am totally stuck.
Thank you,
Kenny [sig][/sig]