Multiple filters on Report fields (1 Viewer)

mgibson

New member
Local time
Today, 09:23
Joined
Feb 9, 2012
Messages
4
Hi,

I have a report that includes buttons to filter the information displayed. One set of buttons filters by type (using the SetFilter embedded macro) and another set of buttons filters by location.

However, when I set one filter it clears any previous filters. So if I filter by location (using the button and macro) and then filter by type (again, using a button and macro) the location filter is ignored. So I am only able to apply one filter at a time to the entire data set.

What am I doing wrong? The report record source is a query. I would like to be able to apply multiple filters to the infromation. Any suggestions?

Thank you, I appreciate any advise or suggestions to help me solve this problem. :)
 
Last edited:

vbaInet

AWF VIP
Local time
Today, 17:23
Joined
Jan 22, 2010
Messages
26,374
Concatenate the previous filter with the current one.

Forms!FormName.Filter & " AND " & "New filter"
 

mgibson

New member
Local time
Today, 09:23
Joined
Feb 9, 2012
Messages
4
vbaInet, thank you for your response. Is there a way to do this in the expression builder? Or as an "embedded macro", I don't know vba and am looking for a quick solution if possible.

Thanks
 

vbaInet

AWF VIP
Local time
Today, 17:23
Joined
Jan 22, 2010
Messages
26,374
You should be able to do it in a macro but I don't use them.

Form.Filter & " AND " & "New Filter criteria here"
 

Users who are viewing this thread

Top Bottom