LarryDavidow
Technical User
Hi
I have a subform that is opened from a form that is linked via a keyed field.
I would like to link the subform with more than one field.
Here is my code for opening the subform so far.
Private Sub Company_DblClick(Cancel As Integer)
On Error GoTo Err_Company_DblClick
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Bookings subform Detail"
stLinkCriteria = "[Company]=" & "'" & Me![Company] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Company_DblClick:
Exit Sub
Err_Company_DblClick:
MsgBox Err.Description
Resume Exit_Company_DblClick
End Sub
I would like to add another link value to the stLinkCriteria variable.
I have a subform that is opened from a form that is linked via a keyed field.
I would like to link the subform with more than one field.
Here is my code for opening the subform so far.
Private Sub Company_DblClick(Cancel As Integer)
On Error GoTo Err_Company_DblClick
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Bookings subform Detail"
stLinkCriteria = "[Company]=" & "'" & Me![Company] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Company_DblClick:
Exit Sub
Err_Company_DblClick:
MsgBox Err.Description
Resume Exit_Company_DblClick
End Sub
I would like to add another link value to the stLinkCriteria variable.