leonel Posted November 13, 2012 Posted November 13, 2012 ok, i got this windows form, with one combobox control and 4 texboxes what i want to acomplish is to populate the texboxes with data from the table, base on the selected item from the combobox. example. table name: RMA_Transactions Fields: Rma_Number, Supplier, Device,Model, Serial_Number the Rma_number is display on the combobox, no problem there for me. this is the code to populate the combobox" Private Sub Receive_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Dim con As New SqlConnection(" Data Source=GX520B;Initial Catalog=ReturnEquipment;Integrated Security=True") Dim cmd As New SqlCommand("Select rma_number FROM dbo.Rma_Transactions") cmd.Connection = con Dim da As New SqlDataAdapter Dim ds As New DataSet da.SelectCommand = cmd ds.Clear() da.Fill(ds, "dbo.Rma_Transactions") CbReceive.DataSource = ds.Tables("dbo.Rma_Transactions") CbReceive.DisplayMember = "rma_number" End Sub The help I need is getting the texboxes to display the data. Quote
leonel Posted November 14, 2012 Author Posted November 14, 2012 i remove the textboxes and drop a datagridview instead, now i would like to populate the datagridview base on the selection from the combobox. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.