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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box autofills another combobox

Status
Not open for further replies.

morristk

IS-IT--Management
Apr 30, 2004
9
0
0
I have a combobox with a series of numbers (ie-601) called CommodityClassID. Each of these numbers has several 'subcodes' tied to it (ie-60104, 60112, 60175) called CommodityCodeID.

I would like for users to be able to click on the combobox with the CommodityClassID and from that another combobox will be populated with the CommodityCodeID subcodes.

How do I do this? Thanks for ANY help you can throw my way:)
 
use the first combobox's onclick event to set the rowsource for the second combo box and then combbox2.requery.

this is an example from my own code that fills cmbtech with all techs under a manager selected in cmbman:

Private Sub cmbMan_AfterUpdate()
cmbTech.RowSource = "select fklev1id, name from dbo.qrylev1emps where fklev2id = " & cmbMan.Value
cmbtech.requery
end sub

---------------------------------------
2b||!2b that == the_question
 
Search this forum for cascading combo

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top