Below is my code that I use for searching a query to display results on a form. The problem is that I want to add a second combo box [season], that links with the first [opponent]
(name of second combo - cboseason)
Does anyone know how I can change the code so that when I click OPEN it will search the query for the value of the combined combo boxes: opponent and season
Private Sub open_Click()
On Error GoTo Err_open_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "sbo"
stLinkCriteria = "[MAIN TABLE.OPPONENTS]=" & "'" & Me![cboopp] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_open_Click:
Exit Sub
Err_open_Click:
MsgBox Err.Description
Resume Exit_open_Click
End Sub
(name of second combo - cboseason)
Does anyone know how I can change the code so that when I click OPEN it will search the query for the value of the combined combo boxes: opponent and season
Private Sub open_Click()
On Error GoTo Err_open_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "sbo"
stLinkCriteria = "[MAIN TABLE.OPPONENTS]=" & "'" & Me![cboopp] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_open_Click:
Exit Sub
Err_open_Click:
MsgBox Err.Description
Resume Exit_open_Click
End Sub