I'm a little new to Access 2007 and need help coding filters in VBA.
Right now my report has 3 fields:
FirstName LastName Grade
In the header of my report are 1 checkbox for each grade (9 - 12).
I want to be able to display, for example, only students in Grade 12 when I click the "Grade 12" checkbox.
The ApplyFilter method won't work because, according to this it can only be used on the OnOpen event.
I've seen the Me.FilterOn method used in some forum postings but I'm having difficulty getting that to work. Here's the code that I have:
Expand|Select|Wrap|Line Numbers
- Private Sub grade_check_Click()
- Dim strFilter As String
- strFilter = "[Grade] = '12'"
- Me.Filter = strFilter
- End Sub
Thanks!