Protect MS Access Database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jimrand
    New Member
    • Feb 2008
    • 10

    Protect MS Access Database

    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!!
  • cori25
    New Member
    • Oct 2007
    • 83

    #2
    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.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32668

      #3
      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.

      Comment

      • jmargel
        New Member
        • Feb 2008
        • 2

        #4
        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>.ShortcutM enu = 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:
        Code:
        Sub DisableShiftKey()
        
            Dim db As DAO.Database
            Dim prp As DAO.Property
        
            Set db = CurrentDb
            Set prp = db.CreateProperty("AllowBypassKey", dbBoolean, False, True)
            db.Properties.Append prp
        
            db.Properties.Refresh
        
            Set prp = Nothing
            Set db = Nothing
        
        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.

        Comment

        Working...