By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,935 Members | 1,448 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,935 IT Pros & Developers. It's quick & easy.

Protect MS Access Database

P: 10
Hi

I want to protect an MS Access 2007 database I have created so that users cannot use anything other than the forms I have put in place. I have been able to create a login page which requires they use a password to get to the sub forms, so from that point of view I am happy.

What I have noticed however, is that I can use the built in options to hide the navigation pane and menus, but actually they're quite easy to find again if you simply right click on the menu bar. This is a typical Microsoft stupid problem. I do not want to password protect the whole database because then the users need that password just to get into the database and once in whatever controls I can access, so can savvy users.

Does anyone know how to protect the database in such a way that allows users to have full access to update forms, run reports, etc, but doesn't allow them to mess with the fabric of the database itself?

Any help greatly appreciated - thanks!!
Feb 19 '08 #1
Share this Question
Share on Google+
3 Replies


cori25
P: 83
Hello...

In design view in the database, go to tools and then startup.

Uncheck all the windows, such as; Display db window, display status bar, allow full menus, ect.....

uncheck all of these and they will not be able to manipulate the data.
Feb 19 '08 #2

NeoPa
Expert Mod 15k+
P: 31,769
This is true, but be VERY wary of locking YOURSELF out too.
A backdoor is normally coded in before removing all checks as suggested here.
Feb 20 '08 #3

P: 2
Holding down shift while opening up the database will bring the database window up.

You can disable the right click by using this code (has to be used on every form)

Forms!<form name>.ShortcutMenu = False

Also go into VBA click on tools, properties and set a password for your vba code. They won't be able to import, export or view the code without first going into vba design mode which will ask for the password.

There is a way to disable the shift key, however you will never be able to open it again in design view. I high recommend against this, but you really need it the code is:
Expand|Select|Wrap|Line Numbers
  1. Sub DisableShiftKey()
  2.  
  3.     Dim db As DAO.Database
  4.     Dim prp As DAO.Property
  5.  
  6.     Set db = CurrentDb
  7.     Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, False, True)
  8.     db.Properties.Append prp
  9.  
  10.     db.Properties.Refresh
  11.  
  12.     Set prp = Nothing
  13.     Set db = Nothing
  14.  
  15. End Sub
If you run this function, next time you open it you will not be able to get to the database window by holding down the shift key. This is permanant, once you run this function consider your database totally locked for good.
Feb 20 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.