Changing Current User Password

  • Thread starter Thread starter Casey
  • Start date Start date
C

Casey

Hi,

I have a form that I am using that has the text boxes
OldPwd, NewPwd, and Vrfy on it. The entries into those
boxes are Old Password in the OldPwd text box, New
Password in the NewPwd text box, and Verify New Password
in the Vrfy text box.

I have button set up on the same form, whose onclick
event procedure is the following. I think that I am near
what is right, but the code does not seem to complete the
change password task.

Does anyone know how I can adjust the following code
to have a change of password for the current user happen.

I would really appreciate any effective advice.

Private Sub Command174E_Click()
Dim ws As Workspace
Dim usr As User
Set ws = DBEngine.Workspaces(0)
With ws
If [NewPwd] = [Vrfy] Then
Set usr = CurrentUser()
usr.NewPassword OldPwd, NewPwd
End If
End With
End Sub


Thanks,

Casey
 
I have full code that does that. Please send me an Email
with your return Email address (should the one you've
listed here be incorrect).

Bob
 
Hi,

(e-mail address removed) is my correct email address

Thank you for any help Bob.
-----Original Message-----
I have full code that does that. Please send me an Email
with your return Email address (should the one you've
listed here be incorrect).

Bob
-----Original Message-----
Hi,

I have a form that I am using that has the text boxes
OldPwd, NewPwd, and Vrfy on it. The entries into those
boxes are Old Password in the OldPwd text box, New
Password in the NewPwd text box, and Verify New Password
in the Vrfy text box.

I have button set up on the same form, whose onclick
event procedure is the following. I think that I am near
what is right, but the code does not seem to complete the
change password task.

Does anyone know how I can adjust the following code
to have a change of password for the current user happen.

I would really appreciate any effective advice.

Private Sub Command174E_Click()
Dim ws As Workspace
Dim usr As User
Set ws = DBEngine.Workspaces(0)
With ws
If [NewPwd] = [Vrfy] Then
Set usr = CurrentUser()
usr.NewPassword OldPwd, NewPwd
End If
End With
End Sub


Thanks,

Casey
.
.
 
Back
Top