Working with a dropdown box

woknick

Registered User.
Local time
Today, 00:36
Joined
Sep 25, 2004
Messages
85
I am creating an order form. On this form, you can choose a supplier from a dropdown menu. There are certain products that can be ordered under that supplier. My question is how can I populate the product dropdown box with the products from the supplier and then be able to select from that populated dropdown.


CustNumer is a number that is assigned to a product to determine what supplier it is attached to it.

Right now I have a Dlookup
cboProducts.Value = DLookup("Description", "Product", "CustNumber='" & txtCustNum.Value & "'")
Me.Repaint

The dlookup will populate the Products combo box, but unfortunately it will not add more then one product.

thanks
 
Off the top of my head:

Me.cboProducts.RowSource = "SELECT Description FROM Product WHERE CustNumber='" & Me.txtCustNum & "'"
 

Users who are viewing this thread

Back
Top Bottom