Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using 2 Combo Boxes on a Form

Status
Not open for further replies.

Kevsim

Instructor
Apr 18, 2000
385
AU
I am using 2 tables,T_Supplier and T_Product joined as a query,Q_SupplyProd.On a form I have 2 Unbound Combo boxes, one is Supplier, two is Product, the Form name is FM_Supply. When I select a Supplier from the first combo box (Supply), I only require the products provided from that supplier to appear in the second combo box, (Prod). I am using the query, Q_SupplyProd for the input for the combo boxes. I have used the following SQL statement in RowSource in Prod combo box,
SELECT DISTINCTROW Q_SupplyProd.Supplier, Q_SupplyProd.Product
FROM Q_SupplyProd
WHERE (((Q_SupplyProd.product)=[Forms]![FM_Supply]![supply])));
I select the Supplier from the first combo box (supply), then click on the second combo box (prod), a window opens requesting “Enter Parameter Value” I type in a supplier click OK, nothing appears in the drop down list of the products combo box. Even typing nothing in the window, there is no dropdown list from products when I know that supplier has this product, there appears to be no reference to the first combo box.
There is also code in the AfterUpdate on the first combo box as follows -
Private Sub Productcheck_AfterUpdate()
Supply.Requery
End Sub
I would be grateful for any assistance.
kevsim
[sig][/sig]
 
Send me an email. I have an example db. Just check the Sample selection form.
[sig]<p>John A. Gilman<br><a href=mailto:gms@uslink.net>gms@uslink.net</a><br>[/sig]
 
jagilman,
Thank you for your assistance.
kevsim [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top