Solved

Combo boxwith a difference

Posted on 2011-03-24
2
372 Views
Last Modified: 2012-05-11
Hi all,

Grateful for assistance/advice.

I have a form with a combo box which selects from a list of data from a particular field in a table. The selected item is then saved in another table...so far so good.

However i would like the combo to show up only a selection of items from that list. In other words i dont want the combo box to show all the list of items for that particular field but only a section of them based perhaps additional data from another field. hence...


field1 - field2
bob - a
jill - a
tom - b
jack - a

I would like the combo box to show only the names of field 1
that has "a" as field 2

Thanks
0
Comment
Question by:PipMic
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 125 total points
ID: 35206350
You can certainly filter your combo, but the question is HOW do you intend to do this - or rather, what event would you use to trigger the filter?

Do you want it to ALWAYS filter based on the "field 2" data, and if so, where does that filter come from?

Note that to filter a Combo, you simply use a standard SELECT query with a WHERE clause:

SELECT Field1 FROM MyTable WHERE Field2='a'

This will ALWAYS filter that combo for records with "a" in Field2.

0
 

Author Closing Comment

by:PipMic
ID: 35206530
In access the the Where condition in enclosed in brackets. Other than that ok. Took me a few minutes to realise.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

821 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