How to filter using multiple combos

yus786

I do OK
Local time
Today, 01:21
Joined
Jun 25, 2008
Messages
121
I have a simple form that lists all the students, classes, exam results and period.

The form can be filtered by class and the after update code is

Form_ExamScore_ALL.Filter = "Class='" & Me.cboClass & "'"
Form_ExamScore_ALL.FilterOn = True
However i would like to introduce another combo for the Period and then filter further using this.

How can this be achieved please?
 
Something like this:

Code:
Form_ExamScore_ALL.Filter = "Class='" & Me.cboClass & "' AND Period='" & Me.cboPeriod & "'"
Form_ExamScore_ALL.FilterOn = True

or if the period is not text, but numeric:
Code:
Form_ExamScore_ALL.Filter = "Class='" & Me.cboClass & "' AND Period=" & Me.cboPeriod
Form_ExamScore_ALL.FilterOn = True
 
Thanks a bunch. I was trying with a & symbol and not the actual work AND.

Cheers
 

Users who are viewing this thread

Back
Top Bottom