I have a form with a command that filters my information based on the value selected in a combo. I don't get any error messages, so I'm not quite sure what the problem is, as I have already tried switching things up, but the problem is not fixed.
The problem: I have a field labeled "Class." For the table I'm working on the values that can be chosen in the combo to be used as the filter includes: 1988 (Intl); 1989 (Intl); 1990 (Intl); 1991 (Intl); 1992 (Intl); 1993 (Intl); 1994 (Intl)
Once I select one of those values, all my subform returns is just the first record before any filtering was done.
Here is my code:
Private Sub Command56_Click()
If IsNull(Me.Class) Then
Forms!International.Subs.Form.FilterOn = False
Else
Forms!International.Subs.Form.Filter = "Class = """ & Me.Class & """"
Forms!International.Subs.Form.FilterOn = True
End If
End Sub
Where:
Class = name of field
Me.Class = reference to the Combo, which is named Class
Subs = name of subform
International = name of form
I have a similar table in which I use exactly the same filter command and it works. However, the values for this combo include: 2011; 2012; 2013; 2014; 2015
This leads me to believe that having parenthesis in a combo box screws things up.