Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm1 As New Form1
Dim n As String = Label4.Text
Dim ConStr As String = "provider=microsoft.jet.oledb.4.0;" & _
"data source= " & Application.StartupPath & "\" & "Mydata.mdb;"
Dim connection As New OleDb.OleDbConnection(ConStr)
Dim savinto As New OleDb.OleDbCommand
savinto.Connection = connection
savinto.CommandType = CommandType.Text
savinto.CommandText = "UPDATE Table1 SET nom= '" & Trim(TextBox1.Text) & "' ,prenom = '" & Trim(TextBox4.Text) & "' ,tel = '" & Trim(TextBox3.Text) & "',adresse='" & Trim(TextBox5.Text) & _
" ' ,ville = '" & Trim(TextBox2.Text) & " ' ,serie = ' " & Trim(TextBox6.Text) & "',poid = '" & Trim(TextBox7.Text) & " ' WHERE poid = '" & n & " ' "
Try
connection.Open()
savinto.ExecuteNonQuery()
connection.Close()
MsgBox("data has been added")
Catch ex As Exception
End Try
frm1.Show()
Me.Hide()
End Sub
====Please help why it dosn 't work