Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 03-28-2013, 06:56 AM   #1
Juliaataccess
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

Hi,

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 ?


Regards,
Julia

Juliaataccess is offline   Reply With Quote
Old 03-28-2013, 08:04 AM   #2
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,224
Thanks: 40
Thanked 3,641 Times in 3,512 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

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

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

Tags
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 12:47 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
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