Populating from one combobox to another combobox in VB.NET

kishore12

New member
Local time
Today, 07:27
Joined
Jan 29, 2009
Messages
1
Hi !
I have two comboboxes in VB.NET. One is to display State from state table and another is used to display districts from district table. When i select a partiular state districts corresponding to that state only needs to be displayed.The problem is at the time of databinding combobox control what query i need to place in the Query builder of TableAdapter Configuration Wizard so that if i select a particular state districts corresponding to that state only needs to be displayed. I tried with creating SQL Dataadapters and datasets manually but it doesn't work out. Also i tried various types of SQL Server joins in Query Builder of TableAdapter Configuration Wizard but it doesn't work out. So pls help me regarding this problem.
 
Last edited:
Hi there,

Did you end up finding an solution to your problem? I'm having a similar problem, where I want to use Query Builder to create an expression where table with the required information is selected by the user. I want the user to select the year that their car is made from a combobox, and based on that selection, another combobox is populated with cars from that specific year. The tables are named by year, and the year corresponds to the year selected in the first combobox. I've tried something like this, but it doesn't work:
SELECT Model
FROM [cboYear.Text]

Any help is greatly appreciated.
 

Users who are viewing this thread

Back
Top Bottom