Here is my code.
Dim ObjCon As New dbConnect ObjCon.con.Open() Dim da As New OleDbDataAdapter '("SELECT * FROM customer", ObjCon.con) Dim dt As New DataTable Try Dim cmd = New OleDbCommand("Select * from tbl_Customer where cust_company='" & cboSearch.Text & "'", ObjCon.con) da = New OleDbDataAdapter(cmd) da.Fill(dt) txtCstID.Text = dt.Rows(0).Item(0) txtCstFName.Text = dt.Rows(0).Item(1) txtCstLName.Text = dt.Rows(0).Item(2) txtCstCompany.Text = dt.Rows(0).Item(3) txtCstAddress.Text = dt.Rows(0).Item(4) cboCstCity.Text = dt.Rows(0).Item(5) txtCstTel.Text = dt.Rows(0).Item(6) txtCstEmail.Text = dt.Rows(0).Item(7) txtCstWeb.Text = dt.Rows(0).Item(8) txtCstFax.Text = dt.Rows(0).Item(9) ObjCon.con.Close() Catch ex As Exception MessageBox.Show(ex.ToString) End Try
Here is the error I am getting

This post has been edited by raelkun00: 31 July 2013 - 11:11 AM