change admin password

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
PETER said:
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
 
Back
Top