by mohamed (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 23rd July 2007
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
change password code
If Me.txtconfirm = Me.txtnewpassword Then
SQL = " UPDATE users SET [Password]='" & Me.txtnewpassword.Text & "' where UserName like '" & Me.txtusername.Text & "' and [Password] like '" & txtoldpassword.Text & "'"
PWord = Me.txtnewpassword.Text
conn.Execute SQL
MsgBox "Your Password have been Changed Successfully!", , "Success"
'Me.txtusername.Text = ""
Me.txtconfirm.Text = ""
Me.txtnewpassword.Text = ""
Me.txtoldpassword.Text = ""
Me.txtoldpassword.SetFocus
Else
MsgBox "Invalid Password confirmation!"
End If
Else
MsgBox "Invalid Old Password"
End If