Go Back   Access World Forums > Microsoft Access Discussion > Forms

Thread Tools Rate Thread Display Modes
Old 03-28-2013, 06:56 AM   #1
Newly Registered User
Join Date: Mar 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Juliaataccess is on a distinguished road
Angry Adding a button to request a filter


I have a form and want to filter records on demand, as each time the filter will be based on a different set of criteria.

It works well, execpt that the user has to remember to go to the Ribbon or the Quick Access Toolbar to click on the "Filter" button so they can choose the relevant filter criteria - usually from the Organisation Type and Borough fields - eg. Carers in Tower Hamlets.

I have struggled to find a way to put a button for this option into the form. I'd like one to appear beside these 2 main filtering fields so the user can click inside the field and click on this, instead of having to remember to go to the Ribbon or Quick Access Toolbar for it.

Can you help me with this query ?


Juliaataccess is offline   Reply With Quote
Old 03-28-2013, 08:04 AM   #2
Super Moderator
Join Date: Feb 2013
Location: UK
Posts: 11,343
Thanks: 40
Thanked 3,670 Times in 3,538 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Adding a button to request a filter

Is the object you are trying to filter a subform?

If so then either in the onchange event for each combo or if you want a button, in the button on click event put code similar to this

YourSubFormName.Form.Filter = "[SomeField] = " & combo1 & " AND [SomeOtherField] = " & combo2
If the values in your combo are text then substitute

" & combo2 with '" & combo2 & "'"
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is online now   Reply With Quote

button , qat , ribbon

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a filter to the next record button Vitiositas Forms 2 11-05-2012 05:54 AM
automatically adding fields in a request osama2012 Queries 3 10-01-2012 07:46 AM
Simple Filter or Query Solution Request boomslanger Queries 2 06-18-2009 04:26 PM
Help Adding Filter Menu action button ElvisR Forms 0 08-06-2007 08:33 AM
Adding a request date field ChampionDuy Tables 2 04-26-2004 05:40 AM

All times are GMT -8. The time now is 02:52 PM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World