G
Guest
Scenario - I am trying to implement an option for the user to be able to
change their password.
Accordingly, I have used the following Module code -
Function faqChangePassword(ByVal strUser As String, _
ByVal strPwd As String, ByVal strOldPwd As String) As Integer
Dim ws As Workspace
Dim usr As User
On Error GoTo err_ChangePassword
Set ws = DBEngine.Workspaces(0)
Set usr = ws.Users(strUser)
usr.NewPassword strOldPwd, strPwd
err_ChangePassword:
If Err.Number = 3033 Then
MsgBox "You do not have permission to modify passwords. Please contact your
System Administrator"
End If
End Function
However, this code is giving me the message (msgbox text). Whenever I try
to change my password. I have admin rights. This will obviously propogate
to other users when they attempt to change their password.
What changes should I make in the function that will not give me permission
denied message.?
change their password.
Accordingly, I have used the following Module code -
Function faqChangePassword(ByVal strUser As String, _
ByVal strPwd As String, ByVal strOldPwd As String) As Integer
Dim ws As Workspace
Dim usr As User
On Error GoTo err_ChangePassword
Set ws = DBEngine.Workspaces(0)
Set usr = ws.Users(strUser)
usr.NewPassword strOldPwd, strPwd
err_ChangePassword:
If Err.Number = 3033 Then
MsgBox "You do not have permission to modify passwords. Please contact your
System Administrator"
End If
End Function
However, this code is giving me the message (msgbox text). Whenever I try
to change my password. I have admin rights. This will obviously propogate
to other users when they attempt to change their password.
What changes should I make in the function that will not give me permission
denied message.?