Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Combo boxwith a difference

Posted on 2011-03-24
2
Medium Priority
?
405 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 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

824 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