This seems like it should be an easy thing, but I think I'm missing something simple here...or I'm just going about it all wrong...
Using Access 2003
I have a form that lists vehicle service dates for different company terminals.
The form loads showing all records.
In the form header I have a combo box named "CSCFilter" that is unbound, and uses the table/query option to list the 16 terminals in our company.
The field I'm trying to filter in the details section is named "CSC"
I'm trying to use the After Update event on the combo box to filter the form based on the selection made on the combo box.
Basically what I have now is 16 identical forms, with each one sorting the CSC manually in the SQL statement...whi ch makes updating the form a pain because I have to make every little change 16x. I want to switch to one form, where I can cycle through the 16 terminals, simply by choosing them on the combo box.
This is what I have in the After Update event:
[code=vb]Private Sub CSCFilter_After Update()
Me.Filter = "CSC = " & Me.CSCFilter
Me.FilterOn = True
End Sub[/code]
Using this function will get the form to filter correctly, however it's not accepting the value in the combo box as the filter value...it's spitting up a dialog box asking me to enter in the parameter value, but the dialog box is changing it's name to the name selected in the combo box...if that makes any sense.
What am I doing wrong?
Using Access 2003
I have a form that lists vehicle service dates for different company terminals.
The form loads showing all records.
In the form header I have a combo box named "CSCFilter" that is unbound, and uses the table/query option to list the 16 terminals in our company.
The field I'm trying to filter in the details section is named "CSC"
I'm trying to use the After Update event on the combo box to filter the form based on the selection made on the combo box.
Basically what I have now is 16 identical forms, with each one sorting the CSC manually in the SQL statement...whi ch makes updating the form a pain because I have to make every little change 16x. I want to switch to one form, where I can cycle through the 16 terminals, simply by choosing them on the combo box.
This is what I have in the After Update event:
[code=vb]Private Sub CSCFilter_After Update()
Me.Filter = "CSC = " & Me.CSCFilter
Me.FilterOn = True
End Sub[/code]
Using this function will get the form to filter correctly, however it's not accepting the value in the combo box as the filter value...it's spitting up a dialog box asking me to enter in the parameter value, but the dialog box is changing it's name to the name selected in the combo box...if that makes any sense.
What am I doing wrong?
Comment