Solved

Combo boxwith a difference

Posted on 2011-03-24
2
354 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

910 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

16 Experts available now in Live!

Get 1:1 Help Now