Home All Groups Group Topic Archive Search About

change admin password

Author
30 Oct 2006 5:34 PM
PETER
The admin password that was set by MS Access no longer works.  I can however
get full permissions to my database using my alternative login.   Is there
any way to replace the old admin password.  Regards  Peter

Author
30 Oct 2006 5:55 PM
Granny Spitz via AccessMonster.com
PETER wrote:
> The admin password that was set by MS Access no longer works.

MS Access *doesn't* assign passwords.  The default password for the default
user, Admin, is an empty string.  If you want to assign a new password to the
Admin user when you don't know what the old one is, sign in as the owner of
the database or a member of the Admins group and run this code, replacing
strPwd with the new password.

Dim ws As Workspace
Dim usr As User

Set ws = DBEngine.Workspaces(0)
Set usr = ws.Users("Admin")
usr.NewPassword "", strPwd
Set usr = Nothing
Set ws = Nothing