Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Multiple filters

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dimas Perez - 30 May 2007 23:17 GMT
I have a form in which I filter groups of employees based on the lat name
using alpha filters (command buttons). I will like to add a filter that can
filter these emplyees based on their title, using a command button and be
able to re-filter the records based on the last name using the alpha filter.

The problem I have experinced is that after filtering the employees by
title, pressing the alpha button clears the first filter. At the time I have
created a query for each title and am looking into reducing th number of
queries that I have.

The database runs on ACcess 2003 at work but I use 2007 at home (if it makes
adifference).
John W. Vinson - 31 May 2007 04:52 GMT
>The problem I have experinced is that after filtering the employees by
>title, pressing the alpha button clears the first filter. At the time I have
>created a query for each title and am looking into reducing th number of
>queries that I have.

I'd use a Parameter Query rather than having a separate query for each
position. You could have a Combo Box on the form selecting all of the valid
titles, and include a clause

[Title] = [Forms]![YourFormName]![TitleComboBoxName]

in the filter. Note that a Filter string is essentially a SQL Query WHERE
clause without the word WHERE, so it can include multiple different fields and
different criteria. What you want is a Filter string resembling

[LastName] LIKE "A*" AND [Title] =  [Forms]![YourFormName]![TitleComboBoxName]

or however you're managing the alpha search.

            John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.