Please help pull me out , I'm making an update on an event(button). In this form which is giving me an error "NO value given for one or more required parameters" My TextBox1 is set to TextBox1.Enable=False
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sample As String
sample = Label11.Text
cn = New OleDbConnection(con)
cn.Open()
With cmd
.Connection = cn
.CommandText = "UPDATE [Borrower] SET [Borrower_Name]='" & TextBox2.Text & _
"',[Type]='" & ComboBox1.Text & _
"',[Course]='" & ComboBox2.Text & _
"',[Year]='" & ComboBox3.Text & _
"',[Address]='" & TextBox5.Text & _
"',[Contact_No]='" & TextBox6.Text & _
"',[Penalty]='" & sample & "' WHERE Val(Borrower_ID)=" & Integer.Parse(TextBox1.Text) & ""
.ExecuteNonQuery()
End With
MsgBox("Borrower Successfully Updated")
cn.Close()
cmd.Dispose()
End Sub
