PC Review


Reply
Thread Tools Rate Thread

Change password form without user account info showing

 
 
=?Utf-8?B?TERW?=
Guest
Posts: n/a
 
      30th Jul 2004
I'm using MS Access 2002 with a secure workgroup using the built in account and permissions routine. The application has a fairly polished front end application, but for the way passwords are changed.

Currently I have a swithcboard button that opens the MS Access user account form (Running macro - DoCmd.RunCommand acCmdUserAndGroupAccounts) where a user can change his/her password on the applicable tab. While the common users cannot change account info I'd really like for them just to get the change password tab without having to click on the tab and without seeing any other security account information or settings.

I don't mind making special forms, macros or such to do this, but I can't seem to figure out how to do this without re-inventing my own security schema, which I have no interest in doing.

Thanks,
 
Reply With Quote
 
 
 
 
Lynn Trapp
Guest
Posts: n/a
 
      30th Jul 2004
You can create your own form with 2 unbound text boxes -- one for user name
and one for password (set it's format mask to password). Add a button with a
call to the following function from the Security FAQ.

Function faqChangePassword (ByVal strUser As String, _
ByVal strPwd As String) As Integer

Dim ws As Workspace
Dim usr As User

Set ws = DBEngine.Workspaces(0)
Set usr = ws.Users(strUser)
usr.NewPassword "", strPwd
End Function

The function call can look something like this:

Private Sub cmdChangePassword_Click()
Dim v_PW_Return As Integer
v_PW_Return = faqChangePassword(Me.txtUserName, Me.txtPassword)
End Sub

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"LDV" <(E-Mail Removed)> wrote in message
news:CBC66DF1-F044-4D8B-B804-(E-Mail Removed)...
> I'm using MS Access 2002 with a secure workgroup using the built in

account and permissions routine. The application has a fairly polished
front end application, but for the way passwords are changed.
>
> Currently I have a swithcboard button that opens the MS Access user

account form (Running macro - DoCmd.RunCommand acCmdUserAndGroupAccounts)
where a user can change his/her password on the applicable tab. While the
common users cannot change account info I'd really like for them just to get
the change password tab without having to click on the tab and without
seeing any other security account information or settings.
>
> I don't mind making special forms, macros or such to do this, but I can't

seem to figure out how to do this without re-inventing my own security
schema, which I have no interest in doing.
>
> Thanks,



 
Reply With Quote
 
Lynn Trapp
Guest
Posts: n/a
 
      30th Jul 2004
LDV,
I forgot to mention that to use the function below the user must be a member
of the Admins group. If they are not you will need to use the following
function and add the OldPassword parameter to the call.

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

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"Lynn Trapp" <(E-Mail Removed)> wrote in message
news:OTJ$(E-Mail Removed)...
> You can create your own form with 2 unbound text boxes -- one for user

name
> and one for password (set it's format mask to password). Add a button with

a
> call to the following function from the Security FAQ.
>
> Function faqChangePassword (ByVal strUser As String, _
> ByVal strPwd As String) As Integer
>
> Dim ws As Workspace
> Dim usr As User
>
> Set ws = DBEngine.Workspaces(0)
> Set usr = ws.Users(strUser)
> usr.NewPassword "", strPwd
> End Function
>
> The function call can look something like this:
>
> Private Sub cmdChangePassword_Click()
> Dim v_PW_Return As Integer
> v_PW_Return = faqChangePassword(Me.txtUserName, Me.txtPassword)
> End Sub
>
> --
> Lynn Trapp
> MS Access MVP
> www.ltcomputerdesigns.com
> Access Security: www.ltcomputerdesigns.com/Security.htm
>
>
> "LDV" <(E-Mail Removed)> wrote in message
> news:CBC66DF1-F044-4D8B-B804-(E-Mail Removed)...
> > I'm using MS Access 2002 with a secure workgroup using the built in

> account and permissions routine. The application has a fairly polished
> front end application, but for the way passwords are changed.
> >
> > Currently I have a swithcboard button that opens the MS Access user

> account form (Running macro - DoCmd.RunCommand acCmdUserAndGroupAccounts)
> where a user can change his/her password on the applicable tab. While the
> common users cannot change account info I'd really like for them just to

get
> the change password tab without having to click on the tab and without
> seeing any other security account information or settings.
> >
> > I don't mind making special forms, macros or such to do this, but I

can't
> seem to figure out how to do this without re-inventing my own security
> schema, which I have no interest in doing.
> >
> > Thanks,

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not change password of domain user account =?Utf-8?B?V29ycmllZCBhZG1pbg==?= Microsoft Windows 2000 0 4th Jan 2006 12:01 AM
Other user account able to change my password without old password prompt noddyt Windows XP Security 1 12th Aug 2005 11:29 PM
Change windows user account password Srikanth Microsoft C# .NET 4 18th Jan 2005 04:51 PM
Change windows user account password Srikanth Microsoft Dot NET 1 18th Jan 2005 04:20 PM
User cannot change password on this account error Mfana Microsoft Windows 2000 Group Policy 1 1st Sep 2004 07:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:41 AM.