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

linking two combo or list boxes? 1

Status
Not open for further replies.

rcreed1

Technical User
May 20, 2004
36
US
If I have a combo box that gives you the selection: 1/11 , 2/11 , 3/11. (assuming these are text values, Army units)and if you select 1/11 the next combo box gives you the selection: A company , B company, D company. However if you selected 2/11 the next combo box gives the selection: E company, F company, G company.

In other words the values in the combo box are dependant upon your selection of the previous selection.

Any help would be greatly appreciated.
Richard
 
Put this in the 'On_Update' event of your first listbox.

Code:
cboSecondCombo.RowSourceType = "Value List"
Select Case cboFirstCombo 'Change this to your combo box name..
Case "1/11"
cboSecondCombo.RowSouce = "A Company; B Company; C Company"
Case "2/11"
cboSecondCombo.RowSouce = "E Company; F Company; G Company"
End Select

There are many ways of acheiving what you need. This is specific to your requirements above.

------------------------
Hit any User to continue
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top