7/02/2012

Associate an mdw security file with a database in Access

Question: In Access 2003/XP/2000/97, I've secured a database with an mdw file. I want to associate the Access database with the mdw file without "joining" the mdw file in the Workgroup Administrator. How do I do this?
Answer: You can associate an mdw file with an Access database, by setting up a Shortcut in Windows.
In our example, we'll assume that the Access database is called suppliers.mdb and the mdw file is called secure.mdw. Both of these files will reside in a directory called c:\test for the purposes of this example.
Now, create a new Shortcut object in Windows. You can do this by right-clicking and choosing New > Shortcut.




When the Create Shortcut window appears, paste the following into the text box and click on the Next button.
"C:\Program Files\Microsoft Office\Office\MSACCESS.exe" "C:\test\suppliers.mdb" /WRKGRP "C:\test\secure.mdw"

The string that you pasted into the text box is composed of 3 components:
The first part of the string is:
"C:\Program Files\Microsoft Office\Office\MSACCESS.exe"
This represents the path to your Access program. This path may vary depending on your version of Access or the installation that you performed. If your path is different, then enter your path to Access instead.
The second part of the string is:
"C:\test\suppliers.mdb"
This represents the path to your Access database.
The third part of the string is:
/WRKGRP "C:\test\secure.mdw"
This tells the shortcut which Access security file (mdw file) to use.

Finally, enter the name of the shortcut and click on the Finish button.


Now, when you want to open the suppliers.mdb, you'll have to run this shortcut.

No comments:

Post a Comment