this is my code
If Me.txtOldPassword.Text = pwd Then
Dim oledbcom1 As New OleDb.OleDbCommand
oledbcom1.CommandText = "Update login Set password = ?"
oledbcom1.Connection = oledbcon
oledbcom1.Parameters.Add("?", OleDb.OleDbType.VarChar)
oledbcom1.Parameters(0).Value = Me.txtNewPassword.Text.Trim
oledbcom1.ExecuteNonQuery()
oledbcon.Close()
end if