I have a form with 2 checkboxes and 2 comboboxes, and a subform to display the corresponding results.
Can can filter my subform by one of the comboboxes by using :-
Dim LSQL
LSQL = "select * from Queries"
LSQL = LSQL & " where RaisedBy = '" & cboRaisedBy & "'"
Form_frmMainSub.RecordSource = LSQL
but what would be the best approach for enabling a filter on all 4 critieria?
What would be best depends very much on the data to be filtered and the link fields. I generally like to use link child and master fields for filtering subforms, because it works very well with no code at all, but it may not suit you. You can set the link fields to the name of controls as well as to the names of fields. You can also consider a mixture of link child and master fields and the filter property. Updating the sql also works, but it can get tedious, and can interfere too much user-applied filters.