Good Afternoon,
Trying to filter my form from a combo box selection. My database contains one main table for all the data and the client would like to be able to filter the form to show only certain records; they ultimately want to be able to filter by County, Facility, or both.
For the filters, I have a combo box that is used to retrieve the data from the user to use as the filter value. Below is the code that I am using to apply the filter:
Private Sub ApplyFormFilter_Click()
Dim sCFiltVal As String
sCFiltVal = "County = " & Me.CountyFilter
Me.Fitler = sCFiltVal
Me.FitlerOn = True
End Sub
When the code runs, I get a text box asking me to "Enter Parameter Value" and the text box displays the "County" Value that I applied via the code (see attached image). If I enter the value for the county, it works. But why am I getting this text box asking for the filter value again?
Trying to filter my form from a combo box selection. My database contains one main table for all the data and the client would like to be able to filter the form to show only certain records; they ultimately want to be able to filter by County, Facility, or both.
For the filters, I have a combo box that is used to retrieve the data from the user to use as the filter value. Below is the code that I am using to apply the filter:
Private Sub ApplyFormFilter_Click()
Dim sCFiltVal As String
sCFiltVal = "County = " & Me.CountyFilter
Me.Fitler = sCFiltVal
Me.FitlerOn = True
End Sub
When the code runs, I get a text box asking me to "Enter Parameter Value" and the text box displays the "County" Value that I applied via the code (see attached image). If I enter the value for the county, it works. But why am I getting this text box asking for the filter value again?