Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'create a connection string named con
- Public sub MyForm_Load
- Dim cmd as new OleDbCommand("Select * from [table name here-avoid brackets
- if required]",con)
- Dim adapter as new OleDbDataadapter(cmd)
- Dim table as new datatable
- adapter.fill(table)
- ComboBox1.DataSource = table
- ComboBox1.DisplayMember = table.Columns(3).ToString 'you can use column name or even row
- Public Sub ComboBox1_IndexChanged
- Textbox1.tex=Combobox1.text
Add Comment
Please, Sign In to add comment