Solved

How filter combobox based on another combobox on a form

Posted on 2016-10-20
1
77 Views
Last Modified: 2016-10-21
I have two comboboxes on a form.  The first one is named cboTYPE.  Depending on the selection made in this combobox I want to filter the available choices in the 2nd combobox.

For example, if the user selects "Football" in the 1st combobox, then I want the option to select only "Brown" in the 2nd combobox.  But if the user selects "Tennis Ball" in the 1st combobox then I want either "Yellow", "Green", or "Purple" to show up in the 2nd combobox.

How can I do this?
0
Comment
Question by:SteveL13
1 Comment
 
LVL 36

Accepted Solution

by:
PatHartman earned 500 total points
ID: 41852734
There are a number of options.  The one I use is:

Change the WHERE clause in the RowSource  query for the dependent combo to reference the parent combo.

Where Type = Forms!yourform!cboType

Then in the AfterUpdate event of cboType, requery the dependent combo.

Me.cboTeam.Requery
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

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…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
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.
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 …

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