Creating an MDW File

The first step in setting up user-level security is to select or create the MDW file that will contain the user groups and users to be defined.

As mentioned earlier, this can be a new file or the default file provided when Access is first used. The recommended approach is to always create a new MDW file. To deter users from accidentally locking themselves out of Access, the User-Level Security Wizard will not permit you to use the default SYSTEM.MDW file.

If you corrupt the default MDW file, you will have to manually recover that file from another source. Whenever modifying or changing the default MDW file, make a backup and store it in a safe location. Of course, users and groups will also need to have the same ID as well for the permissions to be granted properly.

Many developers prefer to create application-specific MDW files with names that indicate the underlying application, making it easy to keep track of the MDW associations. It also makes creating (or reading) shortcuts and target paths a bit more obvious.

As previously mentioned, the Workgroup Administrator dialog box is used to create new MDW files, as well as join to a different default MDW. In Access 2007, you invoke this dialog box by calling the RunCommand object with the acCmdWorkgroupAdministrator parameter. This can be called from VBE in the immediate window with the following code:

RunCommand acCmdWorkgroupAdministrator

While this also works in previous versions of Access, there was also a UI option available, which has been deprecated in Access 2007 to discourage the use of modifying the default system MDW file. In previous versions of Access, to create or select the MDW file, choose Tools O Security O Workgroup Administrator. Calling either the RunCommand or selecting the menu option invokes the Workgroup Administrator dialog box. The Workgroup Administrator dialog box displays the path to the MDW file that is currently joined, as well as options to create a new MDW file or join to a different existing MDW file.

To create a new MDW file, click the Create button. The Workgroup Owner Information dialog box opens. Supply values for the Name, Organization, and Workgroup ID. This information uniquely identifies the authenticity of the MDW file. The Workgroup ID can be from 4 to 20 characters, and should be treated much the same as a password to prevent anyone from guessing it. Once the information has been entered in the Workgroup Owner Information dialog box, click OK. The Workgroup Information File dialog box displays.

The default location is in the C:\Documents and Settings\<user name>\Application Data\Microsoft\Access folder with the default name of SYSTEMx.MDW. On Windows Vista, this path will be like C:\Documents\<user name>\Application Data\Microsoft\Access.

Enter the name and location for the Workgroup file and click OK. The Confirm Workgroup Information displays all the settings for the new MDW file. Be sure to keep a record of the Name, Organization, and Workgroup ID, as these three items can be used to re-create the MDW if the original is lost or somehow rendered unusable. You also need each of the user and group names and IDs as well to re-create the specific user accounts. Then click OK to complete the creation of the new MDW file. It is recommended that you make a backup copy of this new MDW file in case the file becomes corrupted at a later time.

When the MDW file is created through the Workgroup Administrator dialog box, it is automatically joined as the new default MDW file. The MDW file that was last joined is automatically selected the next time Access is invoked under the same Windows user profile on the computer.

+1 0


  • Darcey
    How to make a workgroup in access 2007?
    7 years ago
  • Karri
    How to create mdw files in 2007 ms access?
    7 years ago
  • inigo
    How to create a mdw file in access 2007?
    7 years ago

Post a comment