Hi, im doing a project using vb.net and i want to use a search button to find say a suppliername. i have a table called supplier and instead of using a combobox with the primary key as the supplierid i want to use a search button and search for there name if thats possible. The combobox fills all the text box with the details of that supplier. an example of the cvode i am using to fill these boxes are below. any help would be greatful.
Public Sub FillSupplierDetails()
'declare data row
Dim objRow As DataRow
objRow = objDataSet.Tables(
"Supplier").Rows.Find(cbosuppliers.SelectedItem.ToString)
'link data between database and form
txtsuppliername.Text = objRow.Item(
"Supplier_Name")
txtaddress.Text = objRow.Item(
"Address")
txtaddress2.Text = objRow.Item(
"Address2")
txtaddress3.Text = objRow.Item(
"Address3")
txtcontact.Text = objRow.Item(
"Contact_Number")
txtemail.Text = objRow.Item(
"Email_Address")
txtamountdue.Text = objRow.Item(
"AmountDue")
End Sub
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).