You can simply bind the control to a dataset.
See the code below:
'these are the global variables
Code:
Private objConnection As OleDbConnection
Private objCommand As OleDbCommand
Private objDataAdapter As OleDbDataAdapter
Private objDataTable As DataTable
'you can use below code in any event (like form load)
Code:
'Initialize the Connection object
objConnection = New OleDbConnection(strConnectionString)
'Initialize the Command object
objCommand = New OleDbCommand("SELECT ID, FirstName " & _
"FROM Employee", objConnection)
'Initialize the DataAdapter object and set the SelectCommand property
objDataAdapter = New OleDbDataAdapter
objDataAdapter.SelectCommand = objCommand
'Initialize the DataTable object
objDataTable = New DataTable
'Populate the DataTable
objDataAdapter.Fill(objDataTable)
'Bind the DataTable to the ComboBox
ComboBox1.DataSource = objDataTable
ComboBox1.DisplayMember = "FirstName"
ComboBox1.ValueMember = "ID"
'Clean up
objDataAdapter.Dispose()
objDataAdapter = Nothing
objCommand.Dispose()
objCommand = Nothing
objConnection.Dispose()
objConnection = Nothing
End Sub
End Class
----------------
Let me know if you need any more help.