Security Question

margt_a

Registered User.
Local time
Today, 03:41
Joined
Aug 15, 2002
Messages
35
My problem is this:

If I boot access and my database, I log on with my password and it pops to the main form... as normal. But if I close the main form (thus the database) only (not Access), I can open it again from the file menu, and it opens the database window without the password prompt, and with Admin capabilities! How can I prohibit this? I thought of forcing Access to close on form closure, but is there a way to avoid this thru Access itself?
 
It takes some doing, but it is possible.

First, you should search this forum for ways to secure a startup form (or topics with "Shift Key on Startup Form").

Next, to do this really right, you must assure that your workgroup setup is as follows... (you ARE using workgroup security ???)


1. Create a group that looks just like the default User group.

2. Make all users be members of this new group and then remove them from the Users group.

3. Revoke all rights from the Users group. (Or at least make it a read-only group.)

4. Either create a new account or choose an existing account to be your administration account. Make it a member of the Admins group. (The GROUP name has an 's' on the end.) This account MUST NOT be named Admin (but it couldn't be named that anyway because that is an account you cannot delete or rename, and it exists in the default workgroup database.)

5. Make the existing Admin account (without the 's') a member of the Users group but REVOKE its membership in the Admins group.

6. Now, if you have a startup form (and it sounds like you do), you can get really nasty here. In the Form_Load event, do a test for the CurrentUser = "ADMIN" and, if so, do a DoCmd.Quit - which won't bother your real administrator account if you did step 4 correctly.

That will secure your database from folks who don't properly join a workgroup before connecting to the database. NOTE: If you aren't using workgroup security, this isn't going to work correctly. You will have to do a bit more work in that case. I'll leave it at that for now. But keep this thread active if this advice isn't enough for you.
 
Ok. I have several users set up now with workgroup security, and I mostly understand how it works. There are two admins, no permissions on the User group and Admin is only a member of users. That should take care of 1-5.

For 6, I used the code below:
Private Sub Form_Load()
If CurrentUser = "ADMIN" Then DoCmd.Quit
End Sub

I didn't get an error message, so I can only assume it works. But when I tested it (closed the db with access still up) and reopened the db from the File menu, it brought up the database window, not the startup form, Even though I set the startup settings not to!

Why does it disable my startup settings?

Thanks for all your help,
Margaret
 

Users who are viewing this thread

Back
Top Bottom