ACC2000: Error Starting Microsoft Access with Custom Profile (266769)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q266769
Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies only to a Microsoft Access database (.mdb).

Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

SYMPTOMS

When you start Microsoft Access 2000 or a run-time application with a custom profile, you receive the following error message:
An error occurred and this feature is no longer functioning properly. Would you like to repair this feature now?
After you click Yes or No, you receive the following error message:
Microsoft Access couldn't find file 'system.mdw'. This file is required for startup.

CAUSE

Microsoft Access is unable to locate a workgroup file (System.mdw) during startup. This occurs when all of the following conditions are true:
  1. The workgroup file is not located in the same folder as Msaccess.exe.
  2. The shortcut that you are using to start Microsoft Access does not contain a /Wrkgrp switch that points to a valid workgroup file.
  3. The custom profile that you are using does not contain a Jet subkey that points to a valid workgroup file.

RESOLUTION

Either use the /Wrkgrp switch in the shortcut to point to a workgroup file or include a Jet subkey in the custom profile that points to a workgroup file.

Note You must also make sure that the Everyone and the TERMINAL SERVER USER groups have full permission on the HKEY_CLASSES_ROOT\TypeLib\{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}\9.0 registry key. To do so, follow these steps:

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
  1. On the Start menu, click Run.
  2. In the Run box, type Regedt32, and then click OK.
  3. In Registry Editor, locate the following registry key:

    HKEY_CLASSES_ROOT\TypeLib\{4AFFC9A0-5F99-101B-AF4E-00AA003F0F07}\9.0

  4. On the Security menu, click Permissions.
  5. In the Permissions for 9.0 dialog box, under Security, locate the Everyone and the TERMINAL SERVER USER groups and verify that both of them have full control.

    Note If the Everyone and the TERMINAL SERVER USER groups do not exist , add both the groups, and then provide them full control.
  6. Click OK, and then exit the Registry Editor.

Use the /Wrkgrp Switch to Specify a Workgroup File

The easiest approach to resolve the problem is to include a /Wrkgrp switch in the shortcut that points to a valid workgroup file. For example, create a shortcut on the desktop with the following command-line.

NOTE: The paths to Msaccess.exe and the System.mdw file may be different on your computer. Make sure the paths in your shortcut accurately reflect the location of Msaccess.exe and System.mdw on your computer.
   "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" /Wrkgrp  "C:\MyApplication\System.mdw" /Profile Test
				
For additional information about using command-line switches with Microsoft Access, click the article number below to view the article in the Microsoft Knowledge Base:

209207 ACC2000: How to Use Command-Line Switches in Microsoft Access

For additional information about writing macros and switches for shortcuts in the Package and Deploy Wizard, click the article number below to view the article in the Microsoft Knowledge Base:

236519 MOD2000: How to Write Macros and Switches for Shortcuts in the Package and Deployment Wizard

Include a Jet Subkey in Your Custom Profile

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To create a Jet subkey in your custom profile to specify the path to the workgroup file, follow these steps:
  1. Create a custom profile and a shortcut by following the steps in the "Creating a Custom Profile to Use with Microsoft Access" section later in this article.
  2. In Registry Editor, locate the following key:
       HKEY_LOCAL_MACHINE\Software\Test\MyApp\1.0   
    					
  3. Create the following subkeys
       Jet\4.0\Engines
    						
    to create the following key:
       HKEY_LOCAL_MACHINE\Software\Test\MyApp\1.0\Jet\4.0\Engines
    					
  4. Under the subkey Engines, create the following string value:
       SystemDB
    					
  5. Set the value of the SystemDB string value to the path of your workgroup file, for example, C:\Workgroup\System.mdw
NOTE: If your application requires any other Jet-specific modifications, such as loading the installable ISAMs, you must create the appropriate subkeys or values (or both) under the Jet key of your custom profile.

STATUS

This behavior is by design.

MORE INFORMATION

When you open a database (.mdb) file in Microsoft Access, the Jet database engine requires a workgroup file (System.mdw) in order to start. To determine the path to the workgroup file to use, Microsoft Access goes through several steps.

If the shortcut contains a /Wrkgrp switch that points to a valid workgroup file, Microsoft Access uses that workgroup file. If the shortcut does not contain a /Wrkgrp switch, Microsoft Access searches the Windows registry and uses the location specified in the Jet subkey of the profile in use.

When you use a custom profile to start your application, Microsoft Access does not use the default Access profile found at HKEY_LOCAL_MACHINE\Software\Microsoft\Office\9.0\Access when it starts. Instead, it uses the subkeys of the custom profile that you created. If the profile does not contain a Jet subkey with the path to the workgroup file, Microsoft Access searches the folder where Msaccess.exe is located (for example, C:\Program Files\Microsoft Office\Office). If Microsoft Access still cannot locate a workgroup file, it returns the errors that are mentioned in the "Symptoms" section of this article.

This issue is more likely to occur on computers where Microsoft Access 2000 SR-1 was installed from CD, instead of on computers that were upgraded to SR-1. This is because the default location for the workgroup file (System.mdw) changed in SR-1 and is not in one of the paths mentioned earlier. Therefore, if you use a custom profile to start Microsoft Access 2000 SR-1 on a computer and do not include the /Wrkgrp switch, you will receive the errors that are mentioned in the "Symptoms" section of this article.

Creating a Custom Profile to Use with Microsoft Access

The following steps demonstrate how to create a custom profile to use with Microsoft Access. This example uses the TitleBar string value in the custom profile to customize the titlebar of the application window when Microsoft Access starts.
  1. Click Start, and then click Run.
  2. In the Run box, type Regedit, and then click OK.
  3. In Registry Editor, expand the following key:
       HKEY_LOCAL_MACHINE\Software\Microsoft\Office\9.0\Access\Profiles
    						
    NOTE: If the Profiles key is not listed under the Access key, you must create it. To create the Profiles key, right-click the Access key, point to New, and then click Key. Rename the new key to Profiles.
  4. After you click the Profiles key in the left pane, right-click in the right pane, point to New, and then click String Value.
  5. Under the Profiles key, create a new string value named Test.
  6. Set the value of the Test string value to Software\Test\MyApp\1.0.
  7. Locate the following registry key:
       HKEY_LOCAL_MACHINE\Software
    					
  8. Create the following subkeys
       Test\MyApp\1.0\Run-Time Options
    						
    to create the following key:
       HKEY_LOCAL_MACHINE\Software\Test\MyApp\1.0\Run-Time Options
    					
  9. Under the subkey Run-Time Options, create the following string value:
       TitleBar
    					
  10. Set the value of the TitleBar string value to My Application.
  11. Quit Registry Editor.
  12. On the desktop, create a shortcut with the following command line.

    NOTE: The path to Msaccess.exe may be different on your computer. Make sure the path in your shortcut accurately reflects the location of Msaccess.exe on your computer.
       "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" /Profile Test
    					

Steps to Reproduce the Behavior

  1. Create a new folder on your computer named C:\Workgroup.
  2. Move your current workgroup file (System.mdw) from its current location to the C:\Workgroup folder. If you do not know the current location of your current workgroup file, you can use the Workgroup Administrator (Wrkgadm.exe) utility to locate it.
  3. After moving the workgroup file, use the Workgroup Administrator utility to rejoin the workgroup.
  4. Start Microsoft Access, and then open any database (.mdb) file to verify that Access is functioning correctly.
  5. Quit Microsoft Access.
  6. Create a custom profile and a shortcut by following the steps in the "Creating a Custom Profile to Use with Microsoft Access" section earlier in this article.
  7. Double-click the shortcut to start Microsoft Access. Note that Microsoft Access starts with "My Application" in the titlebar.
  8. Open any database (.mdb) file.
Note that you receive the error messages that are mentioned in the "Symptoms" section of this article.

REFERENCES

For more information about using custom profiles, click Microsoft Access Help on the Help menu, type custom profiles in the Office Assistant or the Answer Wizard, and then click Search to view "Customize your application's environment with Microsoft Access user profiles."

Modification Type:MinorLast Reviewed:1/26/2005
Keywords:kberrmsg kbnofix kbprb KB266769