Populate one combo box based on the selection of another combo box
Thank you for taking the time to report an issue.
What's wrong... Please write below.
I then ran the form wizard to select the data from the query that I wanted to populate in my form and I've added 2 combo boxes.
What I want to do:
1. I want users to be able to select a category in combo box #1 (example: "Bag")
2. I want users to be able to select a detail in combo box #2 based on the category they selected in combo box #1 (example: Combo box #1, "bag" would populate the followingselections for combo box #2: "sandwich" and "tool")
3. I want users to then receive a list of suppliers that provide the product they have selected, either "Bag: Sandwich" or "Bag: Tool"
I have combo box #1 populating a list of categories already. However, I am not able to get combo box #2 to provide choices based on the selection chosen for combo box #1.
Preferably, a step-by-step instruction of what I need to do to make these work properly.
Example: Combo Box Selection is "Prospect " and Text Box value would auto populate to "Opportunity"
or: Combo Box Selection is "Client " and Text Box value would auto populate to "Clients"
The Combo Box is named "Contact_Type" and the Text Box is named "Category"
Basically I'm looking for an Expression or VBA Code that can do this..
For example, the combo box has a list of different projects, (a, b, c, and d) and the list box has a list of ALL of the reports associated with all of the projects. I'd like to be able to select project "a" from the combo box and get ONLY the reports associated with project "a" displayed in the list box.
categoryType – This table has the data for the first combo box and contains three records, Expenses, Income and Refunds
categoryRef – This table contains about 10 records and the data should be displayed when Refunds is selected in the first combo box
categoryInc - This table contains about 15 records and the data should be displayed when Income is selected in the first combo box
categoryExp - This table contains about 20 records and the data should be displayed when Expenses is selected in the first combo box
Is the above the best way to achieve what I am trying to do? Are there any alternatives?
I need this to be fairly low maintenance as there may be a need to add/edit/delete records from any of the tables from time to time.
Combo Box 1: Type one
Combo Box 2: Sub type one
Sub type two
Sub Type Three
Combo Box 1: Type Two, then
Combo Box 2: Sub type Three
Sub type four
Learn how to limit the choices in a combo box when selecting an item in another combo box.
The queries for the list box and the combo box are independent. I can set the value of the combo box when the form loads (sub Form_Load) and when I click on the button (sub Command2_Click), but when I make a selection in the list box (sub List5_AfterUpdate) I get Runtime error 2115: The Macro offunction set to the BeforeUpdate or ValidationRule property for this field is preventing MS Access from saving the date in the field.
I expected that each time I opened the report, I would see the combo box on the form, make my selection from the combo box and then the report would filter based on the combo box selection. Should this work?