K
kay
I am trying to filter the sub form using 3 combo boxes (or may be more) in my
main form.
I tried few codes but that didn’t work.
Here is the sample code I am trying but it filters using last combo box
selection but not all.
Me!subform2.Form.Filter = "[Exception Type] = '" & Me![cboException] & "'"
Me!subform2.Form.FilterOn = True
Me!subform2.Form.Filter = "[Document Dept] = '" & Me![cboDept] & "'"
Me!subform2.Form.FilterOn = True
My sub form is bound to the main Exception Table – (All Exceptions Records –
ClientID is FK, Dept – FK, Exception Type – FK, .. and have duplicates)
This combo boxes are bound to the unique –PK- No Dups - tables (Client,
Department, Exceptions,etc)
So to explain in sql it should do like this – Select * from subform2(’s
recordsource) where subform.[Exception Type] = MainfForm.cboException AND
subform.[Document Dept] = MainForm.cboDept
Thanks for your help and time.
main form.
I tried few codes but that didn’t work.
Here is the sample code I am trying but it filters using last combo box
selection but not all.
Me!subform2.Form.Filter = "[Exception Type] = '" & Me![cboException] & "'"
Me!subform2.Form.FilterOn = True
Me!subform2.Form.Filter = "[Document Dept] = '" & Me![cboDept] & "'"
Me!subform2.Form.FilterOn = True
My sub form is bound to the main Exception Table – (All Exceptions Records –
ClientID is FK, Dept – FK, Exception Type – FK, .. and have duplicates)
This combo boxes are bound to the unique –PK- No Dups - tables (Client,
Department, Exceptions,etc)
So to explain in sql it should do like this – Select * from subform2(’s
recordsource) where subform.[Exception Type] = MainfForm.cboException AND
subform.[Document Dept] = MainForm.cboDept
Thanks for your help and time.