Password protecting the database window

G

Guest

Hi all

I would like to prevent general access to the database window but would still like to be able to use it myself. I think the best way to do this would be to just bring up a dialogue box asking for a password when the user presses F11.

Is there a way to:
a) Capture a keydown event occurring anywhere in the database, and get it to open a form or prompt box instead of the database window?

b) Open the database window using code, i.e. if the correct password is supplied?

Many thanks for your help


David
 
L

Lynn Trapp

Have you blocked the Shift Key bypass? If not, then you can simply hold down
the Shift Key while your database opens. If yes, then you can use the same
procedure to remove that block and then use the Shift Key to open your
database and view the database window.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


David Cleave said:
Hi all

I would like to prevent general access to the database window but would
still like to be able to use it myself. I think the best way to do this
would be to just bring up a dialogue box asking for a password when the user
presses F11.
Is there a way to:
a) Capture a keydown event occurring anywhere in the database, and get it
to open a form or prompt box instead of the database window?
 
G

Guest

Hi Lynn

Thanks for your response. I would like to prevent people who know about opening the database window using the Shift Key from doing so - in order that the database window is protected from everyone who doesn't have the password.

So, is there a way to block people from opening the database window using the shift key, but opening it through Visual Basic code so that I can design some kind of password prompt procedure which opens the database window if the correct password is supplied?

Thanks again

David
 
K

Kevin S.

I'm not going into too much detail because I don't have much time to write
this, but here's an idea:

1. Go to Tools > Startup. Disable special keys. Hide the database window.
2. On your main form (like a switchboard or something) use the on key press
event to trap the F11 key or another key. When that key is hit, have it open
the password form.
3. The password form, if provided the right password, could open the unhide
window dialog box.... something like docmd.runcommand accmdunhidewindow
4. Create a module, and in the editing window for the module, search help
for AllowBypassKey. This will give you code. Run this code (may need to
change values) to disable the shift key.

hope it helps
Kevin

David Cleave said:
Hi Lynn

Thanks for your response. I would like to prevent people who know about
opening the database window using the Shift Key from doing so - in order
that the database window is protected from everyone who doesn't have the
password.
So, is there a way to block people from opening the database window using
the shift key, but opening it through Visual Basic code so that I can design
some kind of password prompt procedure which opens the database window if
the correct password is supplied?
 
G

Guest

Thanks Kevin

It's a complex solution so I'll have to put some time in it. It looks like a good idea though so thank you very much.

Cheers

David
 
J

Joan Wild

David said:
Thanks Kevin

It's a complex solution so I'll have to put some time in it. It looks
like a good idea though so thank you very much.

If you find that complex, you could consider keeping your development copy
on your machine. When you are ready to distribute to users, create a mde,
set the startup properties, disable the shiftkey, and distribute.

If you need to make changes, just open your development copy of the mdb.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top