ComboBox populated by Query not showing values

mattstrachan

Registered User.
Local time
Yesterday, 21:57
Joined
Feb 22, 2013
Messages
31
I have a form for data entry that have multiple comboboxes. I am trying to get one combobox to base its "list" on an entry from a previous combobox.

The first combobox is based on a QuantityType table and has four options.

The next combobox is based on a ProductDesign table and will have close to fifty options.

I want to limit the ProductDesign combobox based on the QuantityType selection which will give the QuantityTypeID. This will refer to the QuantityTypeID linked to the ProductDesign table.

I have created a query that looks like this:

SELECT Product_Design.Product
FROM Product_Design, Quantity_Type
WHERE Product_Design.QuantityTypeID = Quantity_Type.QuantityTypeID
AND Quantity_Type.QuantityType = [Forms]![Product]![Qty_Type];

This Query works and if I simply run the query I get the needed information from it.

What I would like to do with this query is to populate the ProductDesign combobox with this data.

I have tried putting the query in the RowSource field but I get an empty combobox without the data. The strange this is that the combobox must be getting something from the query because the length of the combo box varies based on my QuantityType selection. I.E. if I select "Single" in the QuantityType, the ProductDesign dropdown shows three empty places for data whereas if I select "Multiple" in the QuantityType I see that there is ten empty places for data.

Any help getting the combo box to actually show each option?
 
What you are looking for is a Cascading Combo Box set.

The criteria you would use would be;
Code:
Forms!YourFormName!YourComboName

You would need to Requery the Cascaded Combo in the After Update event of the Master Combo and also in the Form's On Current event.
 

Users who are viewing this thread

Back
Top Bottom