By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,471 Members | 722 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,471 IT Pros & Developers. It's quick & easy.

Using the value of comboBox1 to populate comboBox2

P: 1
Hi, I am fairly new to VB and I am using Visual Studio 2005. I am currently trying to make a simple programme to search a database using 2 different combo boxes to define the search parameters. The database is a list of car manafacturers, models and information about tow bar's (part number etc..). I want the first combo box to be populated with the manafacturer names and that selection to populate the second combo box with the relevant car model. I am sure the solution to this is simple but I have spent 2 days trying to figure it out. I apologise for my vagueness. Let me know what, if any, extra info will help.

Thanks in advance.
Apr 10 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 432
Have you had success in populating your first combo box by binding it to a recordset or another method?

If so then your next step is to use the OnChange event of that combobox1 to fire off the code that will populate combobox2, you would just do it the exact way you populate combobox1 except use the combobox1.Text value as your parameter in your datasource.
Apr 10 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.