Changing a password

K

Ken Howell

Greetings:

Here's the problem I have with MS Access limited
development scheme.

I disabled my menu bar so if a user is logged in to my
front-end application he can no do development options.
The users log in as guest until they are added to a group
for thire permission and rights by me. I use an API and
count their logins as guest. The API retrieves their
network log-in name and I add them to the proper groups,
the counter tells the user to log in using his/her network
log-in name.

Now I want to put up a dialog box that says to create a
password. The only code I can find is something like this:

Dim wrkDefault As Workspace
Dim usrNew As User
Set wrkDefault = DBEngine.Workspaces(0)
With wrkDefault
Set usrNew = .CreateUser(UserName,"workgroup", "")
.Users.Append usrNew
strPassword = InputBox("Enter new password:")
usrNew.NewPassword "", strPassword
MsgBox "Password changed!"
End With

All I want the code to do is set the current users
password not "create a new" user. I can't get the
NewPassword command to work without the SET option. Can
you help me design a function that will assign a password
to the current user when their logged in?

Ken How
(e-mail address removed)
 
J

Joe Fallon

Not sure if this will help:

FYI: The single most un-intuitive concept is:

UsrNew.Groups.Append wrk.CreateGroup("Users")

I spent a lot of time trying to figure out how to get UsrNew into the

EXISTING group Users. It never dawned on me that I had to create an

already existing group. When I got desperate enough I stumbled on the

code above and was surprised to find it worked.
 
J

Joan Wild

Joe Fallon said:
Not sure if this will help:

FYI: The single most un-intuitive concept is:

UsrNew.Groups.Append wrk.CreateGroup("Users")

wrk.Groups("Users").Users.Append UsrNew

works
 
J

Joan Wild

Ken Howell said:
Greetings:


Now I want to put up a dialog box that says to create a
password. The only code I can find is something like this:

Dim wrkDefault As Workspace
Dim usrNew As User
Set wrkDefault = DBEngine.Workspaces(0)
With wrkDefault

Set usrNew = wrkDefault.Users(UserName)
 

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