programatically changing your Access password

  • Thread starter Thread starter Brad Pears
  • Start date Start date
B

Brad Pears

What are the calls to implement into an Access 2000 app that would allow me
as the programmer to give the user a form where they can set/change their
password instead of using the "Access Security and GRoups" area? I have
removed all of the Access built in menus etc... and therefore need to give
the user the ability to do this themselves... I only want them to
set/change their own password. I dpo not want them scrolling through the
list of users and groups etc...

Thanks,

Brad
 
Hi Brad

All you require is one line of code:
DBEngine.Workspaces(0).Users(CurrentUser()).NewPassword strOldPwd,
strNewPwd

Of course, you will need to wrap this up in a form which asks for the old
password and the new one (twice, to verify) and checks the two new ones are
identical.

BTW, if you specify "Password" as the InputMask on a textbox then the
characters typed will be displayed as ****.
 
Thanks a lot for that! That is exactly what I was looking for!!!

Brad
Graham Mandeno said:
Hi Brad

All you require is one line of code:
DBEngine.Workspaces(0).Users(CurrentUser()).NewPassword strOldPwd,
strNewPwd

Of course, you will need to wrap this up in a form which asks for the old
password and the new one (twice, to verify) and checks the two new ones
are identical.

BTW, if you specify "Password" as the InputMask on a textbox then the
characters typed will be displayed as ****.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Brad Pears said:
What are the calls to implement into an Access 2000 app that would allow
me as the programmer to give the user a form where they can set/change
their password instead of using the "Access Security and GRoups" area? I
have removed all of the Access built in menus etc... and therefore need
to give the user the ability to do this themselves... I only want them
to set/change their own password. I dpo not want them scrolling through
the list of users and groups etc...

Thanks,

Brad
 
Does anyone know why I would get an error 3033 "You do not have privileges
for object <username>" when I try to change the password of a user I've
logged in as? Is there some strange permission associated with a user object
I need to set?

Thanks very much -

Dave

Graham Mandeno said:
Hi Brad

All you require is one line of code:
DBEngine.Workspaces(0).Users(CurrentUser()).NewPassword strOldPwd,
strNewPwd

Of course, you will need to wrap this up in a form which asks for the old
password and the new one (twice, to verify) and checks the two new ones are
identical.

BTW, if you specify "Password" as the InputMask on a textbox then the
characters typed will be displayed as ****.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Brad Pears said:
What are the calls to implement into an Access 2000 app that would allow
me as the programmer to give the user a form where they can set/change
their password instead of using the "Access Security and GRoups" area? I
have removed all of the Access built in menus etc... and therefore need to
give the user the ability to do this themselves... I only want them to
set/change their own password. I dpo not want them scrolling through the
list of users and groups etc...

Thanks,

Brad
 
Hi Dave

That is the error you get if the old password you supply is incorrect.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

pcc DaveF said:
Does anyone know why I would get an error 3033 "You do not have privileges
for object <username>" when I try to change the password of a user I've
logged in as? Is there some strange permission associated with a user
object
I need to set?

Thanks very much -

Dave

Graham Mandeno said:
Hi Brad

All you require is one line of code:
DBEngine.Workspaces(0).Users(CurrentUser()).NewPassword strOldPwd,
strNewPwd

Of course, you will need to wrap this up in a form which asks for the old
password and the new one (twice, to verify) and checks the two new ones
are
identical.

BTW, if you specify "Password" as the InputMask on a textbox then the
characters typed will be displayed as ****.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Brad Pears said:
What are the calls to implement into an Access 2000 app that would
allow
me as the programmer to give the user a form where they can set/change
their password instead of using the "Access Security and GRoups" area?
I
have removed all of the Access built in menus etc... and therefore need
to
give the user the ability to do this themselves... I only want them to
set/change their own password. I dpo not want them scrolling through
the
list of users and groups etc...

Thanks,

Brad
 
AHA! I was wondering how to trap for that as well.. nothing like 2 answers in
1 response.

Thanks much!

Dave

Graham Mandeno said:
Hi Dave

That is the error you get if the old password you supply is incorrect.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

pcc DaveF said:
Does anyone know why I would get an error 3033 "You do not have privileges
for object <username>" when I try to change the password of a user I've
logged in as? Is there some strange permission associated with a user
object
I need to set?

Thanks very much -

Dave

Graham Mandeno said:
Hi Brad

All you require is one line of code:
DBEngine.Workspaces(0).Users(CurrentUser()).NewPassword strOldPwd,
strNewPwd

Of course, you will need to wrap this up in a form which asks for the old
password and the new one (twice, to verify) and checks the two new ones
are
identical.

BTW, if you specify "Password" as the InputMask on a textbox then the
characters typed will be displayed as ****.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

What are the calls to implement into an Access 2000 app that would
allow
me as the programmer to give the user a form where they can set/change
their password instead of using the "Access Security and GRoups" area?
I
have removed all of the Access built in menus etc... and therefore need
to
give the user the ability to do this themselves... I only want them to
set/change their own password. I dpo not want them scrolling through
the
list of users and groups etc...

Thanks,

Brad
 
Back
Top