I have an old database we are trying to resurrect.
The database has 2 forms, one is used to open the other based on selected criteria.
I have added a Practice list box to the form used to open the second form. The button on the first form currently opens the second form and queries the data to show up in the second form by county based on the county selected in the combo box. I have added the second practice field on the first form but I cannot figure out how to edit the code so it now queries the data in the second form by county and practice. Basically if I pick Anoka and CP23 I only want to see the entered CP23s entered for Anoka on the second form. Any Ideas? Thank you!
Current Code tied to the button on the first form:
Private Sub Command3_Click()
On Error GoTo Err_Command3_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_CountyRecords"
stLinkCriteria = "[County]=" & "'" & Me![Combo1] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command3_Click:
Exit Sub
Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click
End Sub