mutliple filters subform differe
RH

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Mutliple filters on a subform different fields | Access forum

Mutliple filters on a subform different fields | Access forum

resolvedResolved · High Priority · Version 2016

Manny has attended:
Access Intermediate course
Access Advanced course

Mutliple filters on a subform different fields

hi guys,
im trying to filter for 2 different fields based on some check boxes.

the issue i keep having is that it applies the first filter and then the second filter rather than both filters in union. please help :(




If Me!Check65 = True And Me!Check71 = True And Me!Check63 = False Then Number = 1
If Me!Check65 = True And Me!Check71 = False And Me!Check63 = False Then Number = 2
If Me!Check65 = False And Me!Check71 = False And Me!Check63 = False Then Number = 3
If Me!Check65 = False And Me!Check71 = False And Me!Check63 = True Then Number = 4
If Me!Check65 = False And Me!Check71 = True And Me!Check63 = True Then Number = 5

Select Case Number
Case 1
'credit and Blank Comments
With subfrm
.Filter = "Sector <> 'ABS'"
.Filter = "Comments Is Null"
.FilterOn = True
End With
Me!Check65 = True
Me!Check71 = True
Me!Check63 = False
Case 2
' credit and all bonds

RE: mutliple filters on a subform different fields


Hi Manny,

Thank you for the forum question.

You will have to concatenate the Filter.


With subfrm
.Filter = "Sector <> 'ABS'" & and "Comments Is Null"
.FilterOn = True
End With

Let me know if it doesn't make sense or not working.

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

RE: mutliple filters on a subform different fields

thanks Jens!

it worked!!

Manny

RE: mutliple filters on a subform different fields

Great to hear Manny,

Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Mon 14 Oct 2019: Automatically marked as resolved.

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Access tip:

Deleting duplicate records from a table

You cannot delete records tables where there duplicate records. A way around this is to create a new table which wont hold the duplicates. and then deleting the old table.

1. Use a make-table query based on this table only. IMPORTANT - Ensure that you include all of the fields from your original table or you may loose data.

2. Open the query's property sheet by using VIEW, QUERY, PROPERTIES, and set the Unique Values property to Yes

3. Because you have selected the Unique Values to Yes when you run the query, Access creates a new table without duplicate records. You can now delete the old table and rename the new one.

View all Access hints and tips


Server loaded in 0.06 secs.