Hi Jonathan,
I agree with Douglas that you can use MDE to avoid user out of the code, with which is able
to encapsulate the code and secure it in a safe mode. To follow up, I believe a .MDW file is
also a faithful guarder that ensure your code to be safe.
I'm sure you have read this in another post of you. Here I provide you with the way to secure
a database for distribution as a Run-Time application and not force the users to log on with
a password.
1. Use the Workgroup Administrator program (Wrkgadm.exe) to create a new
workgroup information file (System.mdw).
NOTES: Write down the Name, Organization, and WorkGroup ID strings that you
will be prompted for when creating your new workgroup information file and
store them in a safe place. If your workgroup information file ever becomes
lost or corrupted, you can reconstruct it using these identical strings, which
are then encrypted to create a unique token. Without a valid workgroup
information file, you could conceivably be locked out of your database
forever.
2. The Workgroup Administrator automatically logs you on using the new
workgroup information file. Open the database you wish to secure.
NOTES: The workgroup file stores information about what Groups are available,
the Users' logon passwords, and which Users are members of which Groups. The
database file stores the User and Group permissions.
3. You'll be logged on as a user named Admin. From the Tools Menu, select
Security, then User and Group Accounts to add a password for the Admin user.
NOTES: The Admin user is the default account, and setting its password is what
"activates" security.
4. Create a new "Super" user, which is the account you will use to secure the
database. Add this new user to the Admins group.
NOTES: Write down the strings you use for the name and PID in case you ever
need to recreate your workgroup information file. The PID is not the password
- it is encrypted, along with the Name, to create a unique token identifying
the user.
5. Remove the Admin user from the Admins group so that Admin is a member only
of the Users group.
NOTES: You cannot delete the built-in user (Admin) or groups (Admins, Users).
There must always be at least one user assigned to the Admins group so if you
have not added a user to this group you will not be able to remove the Admin
user from the Admins group.
6. Quit Microsoft Access and log back on as the new *Super* user you created in
step 4. You will not have a password for this account yet, so now is a good
time to set one.
7. Open the database you want to secure and run the Security Wizard. Select the
objects you want to secure (it makes sense to secure them all).
NOTES: The Security wizard will create a new database which will be owned by
your new *Super* user and it will import all of the objects and relationships
into it. It will also remove all permissions from the Admin user and the Users
group and encrypt the new database. The original database will be renamed with
a "bak" extension but will not be altered.
8. Open the new database using the *Super* user login. At this point the
Security Settings should be:
- The Admin user is only a member of the Users group.
- The *Super* user is a member of the Users and Admins groups.
- The Admin user has no permissions.
- The *Super* user has no permissions.
- The Users group has the permissions selected in the Security Wizard.
- The Admins group has full permissions.
9. Assign the permissions you want the users to be able to have to the Admin
User.
10. Remove the password from the Admin User then quit Microsoft Access.
NOTES: This will force the user to log on as the Admin User and will disable
the logon dialog so a password is not needed. This will also prevent the
*Super* user from being able to log on.
In order to be able to perform administrative duties you would need to create
or modify an Access shortcut and add the /USER and /PWD switches to allow the
*Super* user to log on as a member of the Admins Group.
For additional information on this security field, please see the following articles:
289885 ACC2002: Overview of How to Secure a Microsoft Access Database
http://support.microsoft.com/?id=289885
254372 ACC2000: Overview of How to Help Protect a Microsoft Access Database
http://support.microsoft.com/?id=254372
232390 ACC: How to Share a Secured Database on a Network (also apply to Acc2000 and
Acc2002)
http://support.microsoft.com/?id=232390
Jonathan, does that answer your question? Please apply my suggestions above and let
me know if this helps resolve your problem. If there is anything more I can do to assist you,
please feel free to post it in the group
Best regards,
Billy Yao
Microsoft Online Support