I have made some(10) combo boxes in my project!!! i need to make them depend the one on the other... i mean if the first combobox is a car brand (e.g Ferrari) then the second combobox must only contain ferrari models! is there a way to hide the rest selections in a combo box when the ferrari is chosen so that only ferrari models are shown in the second?
Dell XPS
0
Junior Poster in Training
Recommended Answers
Jump to Postfor that u need to add the itemsdynamically to the combo at runtime.
Jump to PostI don't have any tutorial to explain all that.But i would suggest you to store all the data in database and select from there using SQL query and fill the remaining combo dynamically at runtime.
Jump to PostIs this what you want?
Private Sub Combo1_Click() If Combo1.ListIndex = 0 Then Combo2.Text = "No data" MsgBox "Please select a car manufacturer." ElseIf Combo1.ListIndex = 1 Then Combo2.Clear Combo2.AddItem "Holden 1" Combo2.AddItem "Holden 2" Combo2.Text = Combo2.List(0) ElseIf Combo1.ListIndex = 2 Then Combo2.Clear Combo2.AddItem "Ford 3" …
Jump to PostInstead of going for all these hardcoding ,its always better to go for database connetion and fill the combo from database tables at runtime as per user selection.
Jump to Postsuppose in a table u store all the company names and in another table all there products.
now in the form load read all the company name name from table1. whwn u change the selection in the combo ,u need to execute the select command in database and select …
All 17 Replies
debasisdas
580
Posting Genius
Featured Poster
Dell XPS
0
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
Dell XPS
0
Junior Poster in Training
Dell XPS
0
Junior Poster in Training
Prozeen
0
Junior Poster in Training
Dell XPS
0
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
Dell XPS
0
Junior Poster in Training
debasisdas
580
Posting Genius
Featured Poster
Prozeen
0
Junior Poster in Training
Prozeen
0
Junior Poster in Training
Dell XPS
0
Junior Poster in Training
Dell XPS
0
Junior Poster in Training
plusplus
0
Posting Whiz in Training
jireh
3
Posting Whiz
Dell XPS
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.