Solved

Combo boxwith a difference

Posted on 2011-03-24
2
342 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
Comment Utility
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
Comment Utility
In access the the Where condition in enclosed in brackets. Other than that ok. Took me a few minutes to realise.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

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.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

771 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