Solved

How filter combobox based on another combobox on a form

Posted on 2016-10-20
1
20 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 34

Accepted Solution

by:
PatHartman earned 500 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

762 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

13 Experts available now in Live!

Get 1:1 Help Now