Microsoft KB Archive/174025

= ACC2: No Permission for Utility.mda When Starting Microsoft Access =

Article ID: 174025

Article Last Modified on 1/26/2005

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition

-



This article was previously published under Q174025



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you start Microsoft Access version 2.0, you may receive the following error message:

No permission for ' \UTILITY.MDA'

This article assumes that you are familiar with Access Basic and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Access Basic, please refer to the "Building Applications" manual.



CAUSE
You have run an Access Basic procedure that removed the Admin user from both the Admins and Users group. Note that if you try to do this through the user interface instead of through code, you receive the following error message:

Can't remove user from group 'Users.'



RESOLUTION
Quit Microsoft Access. In Windows Explorer or Windows File Manager, copy the current System.mda file into System.old. Then run Wrkgadm.exe and create a new System.mda file. You should now be able to start Microsoft Access.

To prevent this problem from occurring, follow these steps:

 Start Microsoft Access and open any database. On the Security menu, click Change Password. Assign a password to the Admin user account. The following procedure assumes that you have changed the Admin user's password to "password" (without the quotation marks).  Create a new module and type the following procedure:

Sub sectest

Dim ws As WorkSpace Dim usr As User Dim grp As Group On Error GoTo Errorhandler Set ws = dbengine.CreateWorkspace("", "admin", "password") ' Create user NewAdmin and add to Admins group. Set usr = ws.CreateUser("NewAdmin", "xxx555", "identify") ws.users.Append usr usr.groups.Append ws.CreateGroup("admins")

' Remove Admin from Admins, Users group. ws.groups("users").users.Delete "admin" ws.groups("admins").users.Delete "admin"

' Log on again and add NewAdmin to Users group. ws.Close Set ws = dbengine.CreateWorkspace("", "NewAdmin", "identify") Set usr = ws.users("NewAdmin") usr.groups.Append ws.CreateGroup("users")

Exit_sectest: Exit sub

Errorhandler: Msgbox CStr(Err) & " " & Error(Err) Resume Exit_sectest

End Sub  Run this procedure and quit Microsoft Access. Restart Microsoft Access; enter "NewAdmin" as the log on name and "identify" as the log on password.</ol>

<div class="moreinformation_section">

Steps to Reproduce Behavior
<ol> In Windows Explorer or Windows File Manager, copy the current System.mda file into System.bak.</li> Start Microsoft Access and open a new database.</li>  Open a new module and type the following code:

Sub sectest Dim ws As WorkSpace Dim usr As User Dim grp As Group On Error GoTo Errorhandler ' Create user NewAdmin and add to Admins group. Set ws = dbengine.CreateWorkspace("", "admin", "") Set usr = ws.CreateUser("NewAdmin", "xxx555", "identify") ws.users.Append usr usr.groups.Append ws.CreateGroup("admins")

' Remove Admin from Admins, Users group. ws.groups("users").users.Delete "admin" ws.groups("admins").users.Delete "admin" ws.Close

Exit_sectest: Exit sub

Errorhandler: Msgbox CStr(Err) & " " & Error(Err) Resume Exit_sectest End Sub </li> Close the database and quit Microsoft Access.</li></ol>

Note that when you attempt to restart Microsoft Access, you receive the error described in the "Symptoms" section.

<div class="references_section">