Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...