C
crispywafers
Hi,
Is it possible to filter ontop of the current filter being applied to
records? This seems like it should be easy?
I have two drop down boxes-- one to filter on a student's last name,
one to filter on the current school year. They work seperatly, but not
together. I would like a user, if they want, to be able to apply both
filters at once -- (only a certain school year and only a certain
student). Help?
Current code:
First Drop Down box (filter on Last Name):
Private Sub Text67_Change()
If Me.Dirty Then 'Save first
Me.Dirty = False
End If
If IsNull(Me.Text67) Then 'Show all
Me.FilterOn = False
Else
Me.Filter = "[SLastName] Like """ & Me.Text67 & "*"""
Me.FilterOn = True
End If
End Sub
Second Drop Down Box (filter on school year):
Private Sub cmbFSchoolYear_Change()
If Me.Dirty Then 'Save first
Me.Dirty = False
End If
If IsNull(Me.cmbFSchoolYear) Then 'Show all
Me.FilterOn = False
Else
Me.Filter = "[SchoolYear] Like """ & Me.cmbFSchoolYear & "*"""
Me.FilterOn = True
End If
End Sub
Is it possible to filter ontop of the current filter being applied to
records? This seems like it should be easy?
I have two drop down boxes-- one to filter on a student's last name,
one to filter on the current school year. They work seperatly, but not
together. I would like a user, if they want, to be able to apply both
filters at once -- (only a certain school year and only a certain
student). Help?
Current code:
First Drop Down box (filter on Last Name):
Private Sub Text67_Change()
If Me.Dirty Then 'Save first
Me.Dirty = False
End If
If IsNull(Me.Text67) Then 'Show all
Me.FilterOn = False
Else
Me.Filter = "[SLastName] Like """ & Me.Text67 & "*"""
Me.FilterOn = True
End If
End Sub
Second Drop Down Box (filter on school year):
Private Sub cmbFSchoolYear_Change()
If Me.Dirty Then 'Save first
Me.Dirty = False
End If
If IsNull(Me.cmbFSchoolYear) Then 'Show all
Me.FilterOn = False
Else
Me.Filter = "[SchoolYear] Like """ & Me.cmbFSchoolYear & "*"""
Me.FilterOn = True
End If
End Sub