All,
I have been struggling for a couple of days now with what should be a very simple procedure.
I have one main form (frmHead) where I entry the main data.
In the main form is also subform (frmTransSub), where additonal data are entered.
Then I have a third »VAT« form primarily for just calculation purposes with one command button on it.
In order to move to the next Record in a subform (frmTransSub) I am trying to use a command button on a Form VAT to make that action.
I can successfully give focus to the subform with Forms!frmHead!frmTransSub.SetFocus.
However, the code doesn’t want to go to the next record in a subform, but it only move ID in the current VAT form instead??
How can I go to the next record in my Subform. How can I adjust the code to do that??
I have been struggling for a couple of days now with what should be a very simple procedure.
I have one main form (frmHead) where I entry the main data.
In the main form is also subform (frmTransSub), where additonal data are entered.
Then I have a third »VAT« form primarily for just calculation purposes with one command button on it.
In order to move to the next Record in a subform (frmTransSub) I am trying to use a command button on a Form VAT to make that action.
I can successfully give focus to the subform with Forms!frmHead!frmTransSub.SetFocus.
However, the code doesn’t want to go to the next record in a subform, but it only move ID in the current VAT form instead??
How can I go to the next record in my Subform. How can I adjust the code to do that??
Code:
Option Compare Database
Option Explicit
Private Sub NextRecordSub_Click()
Forms!frmHead!frmTransSub.SetFocus
DoCmd.GoToRecord , , acNext
End Sub