Hello, I have a split form: frmTotalAmtUnionDuesOwedByMemberID that I open with a cmd button. Once the form opens it has the field: NALCMBRID as though it is a hyperlink. I have the following code for the OnClick event procedure:
Private Sub TextBoxNALCMBRID_Click()
Dim stLinkCriteria As String
stDocName = "Branch 142 Membership"
stLinkCriteria = "[tblMembers.NALCMBRID]=" & Me![NALCMBRID]
strWhere = "[NALCMBRID] = '" & [NALCMBRID] & "'"
DoCmd.OpenForm "Branch 142 Membership", WhereCondition:="tblMembers.NALCMBRID=" & "Me.NALCMBRID"
End Sub
When I select the field: NALCMBRID on the form: frmTotalAmtUnionDuesOwedByMemberID instead of it going to the record with the NALCMBRID I selected. I get "Enter Parameter Value" for Me.NALCMBID. When I enter the NALCMBID, the form: Branch 142 Membership will open for the NALCMBID I entered.
The code is supposed to take me to the record in the XTab query dataset based on the NALCMBRID selected on either the form part or the datasheet part of a split form that's based on a XTab query. The query is a XTab.
I have had nothing but problems getting this same method that has worked on other split forms that are not based on XTab queries. I've used the following in an On Click event procedure for non-XTab queries:
DoCmd.OpenForm "Branch 142 Membership", WhereCondition:="tblMembers.NALCMBRID=" & Me.NALCMBRID.
Thanks for the help.
Private Sub TextBoxNALCMBRID_Click()
Dim stLinkCriteria As String
stDocName = "Branch 142 Membership"
stLinkCriteria = "[tblMembers.NALCMBRID]=" & Me![NALCMBRID]
strWhere = "[NALCMBRID] = '" & [NALCMBRID] & "'"
DoCmd.OpenForm "Branch 142 Membership", WhereCondition:="tblMembers.NALCMBRID=" & "Me.NALCMBRID"
End Sub
When I select the field: NALCMBRID on the form: frmTotalAmtUnionDuesOwedByMemberID instead of it going to the record with the NALCMBRID I selected. I get "Enter Parameter Value" for Me.NALCMBID. When I enter the NALCMBID, the form: Branch 142 Membership will open for the NALCMBID I entered.
The code is supposed to take me to the record in the XTab query dataset based on the NALCMBRID selected on either the form part or the datasheet part of a split form that's based on a XTab query. The query is a XTab.
I have had nothing but problems getting this same method that has worked on other split forms that are not based on XTab queries. I've used the following in an On Click event procedure for non-XTab queries:
DoCmd.OpenForm "Branch 142 Membership", WhereCondition:="tblMembers.NALCMBRID=" & Me.NALCMBRID.
Thanks for the help.