Checkboxes and radios are a problem for this. You'd need to create many queries or reports to get it to work with these controls.
but, there are alternates:
1. use lists (and a table). These values can be added/removed without more programming. User picks items in a listbox, these are added to a 'picked' table, this table is joined
to the data table so that only these values show in the query. No code.
2. using some VB, you could collect the checkbox items selected then open the report with that filter:
Code:
'----------------
sub btnFilter_click()
'----------------
dim sWhere as string ,sWhere2 as string
sWhere = "1=1"
'collect true checkboxes
if chkBrf.value then sWhere2 = sWhere2 & " [Impress]='Brief' or "
if chkBM.value then sWhere2 = sWhere2 & " [Impress]='BusModel' or "
if chkSynth.value then sWhere2 = sWhere2 & " [Impress]='Synthetic' or "
'add AND ,remove last OR
IF sWhere2 <> "" then sWhere = " and " & left(sWhere2, Len(sWhere2)- 4)
If sWhere = "1=1" Then
docmd.OpenReport "rMyReport",acViewPreview
Else
docmd.OpenReport "rMyReport",acViewPreview ,,sWhere
End If
end sub
you can also use it on a form of all records using this filter:
Code:
If sWhere = "1=1" Then
Me.FilterOn = False
Else
Me.Filter = sWhere
Me.FilterOn = True
End If
end sub