Private Sub cb_vat_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cb_vat.SelectedIndexChanged
Dim dr As OleDbDataReader
Dim s As String = "select * from VAT where VatName = '" & cb_vat.Text & "' "
dr = ExecuteReader(s)
While dr.Read()
tb_vat.Text = dr.Item("VatID").ToString
End While
End Sub
Tag : .NET, Win (Windows App), VB.NET, VS 2012 (.NET 4.x)