Changing Current User Password

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
 
B

Bob Barnes

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
 
C

Casey

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
.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top