How to invoke password check on Shift/Open DB

sumdumgai

Registered User.
Local time
Today, 14:18
Joined
Jul 19, 2007
Messages
453
Apparently, holding the shift key down while opening an Access database prevents the 'Autoexec' from executing. How do I force a password entry if the user is smart enough to open the database while holding shift key down?


Thanks.
 
Two ways, (1) password-protect the file, or (2) disable shift bypass.
 
Thanks. If I disable the shift bypass, how do I then allow the DB administrator to view Nav Pane, menus, etc. This database is FE and defaults to Form view only on open.
 
If you have a user-level security system built in, you can use the AutoKeys macro to run code that toggles the NavPane if the user is a developer, and cancels the F11 if they aren't.
 
how do I then allow the DB administrator to view Nav Pane, menus, etc. This database is FE and defaults to Form view only on open.

My method was that people had to be identified / recognized. I used various methods to identify the user by asking Windows "who is this person" and then looked up that person's role in a Users table. My "switchboard" form had a bunch of command buttons that were used to launch various action forms but it had the ability (invoked during the Form_Open routine) to enable or disable some buttons.

So... Use the Disable Bypass option. In your opening form, hide the ribbon and other navigational things to protect everything you want protect. But also test the user ID and enable or disable a command button that allows the user to "turn off" the things done to hide the form. In summary, protect everything either in the File >> Options >> Current Database list or in the opening form's OnLoad event code. Unprotect stuff in the OnClick event code of that button that doesn't get displayed if you aren't an admin.
 
Thanks. If I disable the shift bypass, how do I then allow the DB administrator to view Nav Pane, menus, etc. This database is FE and defaults to Form view only on open.
Hi. You could give the administrator his own unlocked copy of the FE (as one more possible approach besides what's already been offered).
 
Last edited:

Users who are viewing this thread

Back
Top Bottom