G
Guest
I want to create an event procedure where I can double click on a field and
it will open another form and find the corresponding information. I can
easily accomplish this if I am only linking one field, but I need to link two
fields. Both of these fields exist on the primary form and the form I want
to link to, but the command that I have written only seems to link to one of
the items. The following is how I have the event written now.
_______
Private Sub txtUPIN_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInv_1"
stLinkCriteria = "[strUPIN]=" & "'" & Me![strUPIN] & "'"
stLinkCriteria = "[strReviewID]=" & "'" & Me![strReviewID] & "'"
DoCmd.close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_txtUPIN_Click:
Exit Sub
Err_txtUPIN_Click:
MsgBox Err.Description
Resume Exit_txtUPIN_Click
End Sub
__________
What do I need to do differently to link both of the fields [strUPIN] and
[strReviewID] in both forms?
Thanks!
it will open another form and find the corresponding information. I can
easily accomplish this if I am only linking one field, but I need to link two
fields. Both of these fields exist on the primary form and the form I want
to link to, but the command that I have written only seems to link to one of
the items. The following is how I have the event written now.
_______
Private Sub txtUPIN_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmInv_1"
stLinkCriteria = "[strUPIN]=" & "'" & Me![strUPIN] & "'"
stLinkCriteria = "[strReviewID]=" & "'" & Me![strReviewID] & "'"
DoCmd.close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_txtUPIN_Click:
Exit Sub
Err_txtUPIN_Click:
MsgBox Err.Description
Resume Exit_txtUPIN_Click
End Sub
__________
What do I need to do differently to link both of the fields [strUPIN] and
[strReviewID] in both forms?
Thanks!