Solved

How do you allow multiple values to be selected for a MS Access 2003 filter

Posted on 2010-08-29
8
260 Views
Last Modified: 2012-05-10
I have a form with a option group called Region.  The options are
East
West
Midwest
South
All

When someone clicks on West within the option group a Case statement determines the Option value selected and re queries the data to show only the records for the value selected (in my example then only West records would display. If someone selects South all the records for South appear, etc...

However, my dilemma is what if someone wants to view 2 values such as South and West...The below link shows the basic structure of my option group and form using a Case Statement.  http://www.databasedev.co.uk/option_group_filtering.html
0
Comment
Question by:pbo1
  • 4
  • 3
8 Comments
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
An Option Group is mutually exclusive.  How are you selecting more than on Region?

mx
0
 

Author Comment

by:pbo1
Comment Utility
You can select more than 1 more region.  In my example I can only slect West or South not both.  You can only select one.  My question is how can I allow someone to select multiple values..I realize I need to use a solution other than a option group, but what would a suggestion be..
0
 

Author Comment

by:pbo1
Comment Utility
I intended to say above You can NOT select more than 1 region.
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
Comment Utility
Well, ideally you would use a List Box set to Multi Select mode.  But that's a be more complicated.   For your case, since there are a max of 5 choices, I'm thinking 5 check boxes, actually 4 ... because the 'All' case would be all 4 boxes checked.

mx
0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 

Author Comment

by:pbo1
Comment Utility
Hey DB MX...

So you are thinking that I should remove the Option Group and create 5 check boxes ?
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
Well, if you need to select more than one ... yes.  But you only need 4 check boxes, since any combination can be checked.

mx
0
 
LVL 30

Expert Comment

by:hnasr
Comment Utility
"and create 5 check boxes "
As DatabaseMX suggested you may have 4 checkboxes, but as you understood may be appropriate.
All can reduce the check/uncheck operations, checking All adds checks to other 4, unchecking All unchecks the other 4.
THis can be useful, if you have 3 checked and want to clear them. Check - Uncheck All clears the other 4.
0
 

Author Closing Comment

by:pbo1
Comment Utility
I added 5 checkboxes
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now