Hi,
I have a big Questionnaire in multi pages, i want to give the user the same interface like on the paper for that i created multiples Forms (frmPage1, frmPage2, ...frmPage17) when the user click on the next button to go to the second form (frmPage2) i want to continue to enter in the same row (same PK) of the row created in Page1
here my code
Private Sub cmdNext_Click()
On Error Resume Next
Dim PageName As String
Dim LinkCriteria As String
PageName = "frmPage2"
' the field that contains PK on frmPage1
LinkCriteria = "[LICENSE_CODE] = Forms![frmPage1]![cboLicenceType]"
LinkCriteria = LinkCriteria & " And [EST_LICENSE_NO] = Forms![frmPage1]![txtLicenceNo]"
' opening the second page
DoCmd.OpenForm PageName, , , LinkCriteria
'Close the first one
DoCmd.Close A_FORM, "frmPage1"
'End If
'--------------------------------------------------------------------------------
End Sub
Thanks a lot
I have a big Questionnaire in multi pages, i want to give the user the same interface like on the paper for that i created multiples Forms (frmPage1, frmPage2, ...frmPage17) when the user click on the next button to go to the second form (frmPage2) i want to continue to enter in the same row (same PK) of the row created in Page1
here my code
Private Sub cmdNext_Click()
On Error Resume Next
Dim PageName As String
Dim LinkCriteria As String
PageName = "frmPage2"
' the field that contains PK on frmPage1
LinkCriteria = "[LICENSE_CODE] = Forms![frmPage1]![cboLicenceType]"
LinkCriteria = LinkCriteria & " And [EST_LICENSE_NO] = Forms![frmPage1]![txtLicenceNo]"
' opening the second page
DoCmd.OpenForm PageName, , , LinkCriteria
'Close the first one
DoCmd.Close A_FORM, "frmPage1"
'End If
'--------------------------------------------------------------------------------
End Sub
Thanks a lot