Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

mutliple filters subform differe

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

Mutliple filters on a subform different fields

ResolvedVersion 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:

Pop up property

If you want to focus the attention of a form / switchboard to a user then you can change the propeties of a form/switchboard for Pop up to On.

This meand tht the focus for the user must be on the form / switchboard

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.