Solved

How filter combobox based on another combobox on a form

Posted on 2016-10-20
1
188 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 37

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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