change admin password

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
 
G

Granny Spitz via AccessMonster.com

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
 

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