Change Password Button

domingsun

Registered User.
Local time
Today, 14:46
Joined
Jun 20, 2013
Messages
46
Hi All,

Who can teach me to create a "Change Password" button?
Show step by step please :(
 
Do you mean the DB password or a password that you created that is stored in a table?
 
i has cerated a login system.
so the all username and password keep in a table.
so i wan create a Change Password button for the user to change their password.
Example: after they type in new password,will replace the old password in the table.
 
Add your button and in the On Click event you could add something like this:

Code:
Dim NewFirst as String, NewRepeat as String
If MsgBox ("Do you want to change your password?",vbYesNo,"Change Password") = vbYes Then
GetNewPassWord:
NewFirst = InputBox("Please enter your new password")
NewRepeat = InputBox("Please verify your new password")
If NewFirst <> NewRepeat Then
MsgBox "Your Password entries did not match, please try again",vbOKOnly,"Invalid Entries"
Goto GetNewPassword
Else
Docmd.RunSQL "UPDATE tblUsers SET tblUsers.Password ='" & NewFirst & "'" WHERE (((tblUsers.UserID)=" & Me.UserID & "));"
Me.requery
End If
End If

This assumes you have a table for Users and the primary key is an integer that is available from your logon form.
 

Users who are viewing this thread

Back
Top Bottom