I have a table called SupplierInfor with tables:
SupplierID - Autonumber
Date - date
SupplierName - Text
SupplierAddress - text
Telephone - Number
email - text
Town - text
country - text
I want to update all records in this table where supplierID is a certain number. The code i have is as below:
When i run the code i get the error message "no value given for one or more required parameters" Am using vb6 and ADO connection to MS Access 2000.
What is the problem with my code? PLease help me and i will appreciate any assistance.
SupplierID - Autonumber
Date - date
SupplierName - Text
SupplierAddress - text
Telephone - Number
email - text
Town - text
country - text
I want to update all records in this table where supplierID is a certain number. The code i have is as below:
Code:
dim strSQL as string strSQL = "UPDATE SupplierInfor SET " & _ "[Date]='" & txtDate.Text & "', " & _ "[SupplierName]='" & txtSuppName.Text & "', " & _ "[SupplierAddress]='" & txtSuppAddress.Text & "', " & _ "[Telephone]='" & txtTelephone.Text & "', " & _ "[Email]='" & txtEmail.Text & "', " & _ "[Town]=" & cboTown.Text & ", " & _ "[Country]=" & cboCountry.Text & " WHERE [SupplierID]='" & Val(txtSuppID.Text) & "'" Cn.Execute strSQL
What is the problem with my code? PLease help me and i will appreciate any assistance.
Comment