Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Apr 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Protecting Forms/Tables (Access 2000)

    Can I protect password protect the design of forms and tables? Other users should be able to enter data, but not change the design of the form.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Protecting Forms/Tables (Access 2000)

    The best solution is user-level security. Moderator <!profile=WendellB>WendellB<!/profile> has a tutorial on security on his website, with many useful links (I particularly recommend the Microsoft Access Security FAQ).

    An alternative is to create an MDE file from the MDB file: Tools | Database Utilities | Make MDE File... The design of forms, reports and modules cannot be viewed or modified in an MDE file. You must keep a copy of the MDB, for if you want to edit a form or report, you must do so in the MDB and then generate a new MDE from it.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Protecting Forms/Tables (Access 2000)

    Only by compiling into an MDE, which prevents the user from getting into the database window. It also prevents the developer from getting into the database window, so you need to keep an uncompiled copy around for making changes and then compile a new MDE after the changes. The other alternative is to turn off the database window in Tools-->Startup. If you do a Lounge search in this forum on "hide database window" or "hide db window", you'll find threads explaining the details of how to do it in code as well.
    Charlotte

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protecting Forms/Tables (Access 2000)

    1. Creating your own Master Form (Main Screen, whatever you want to call it), you can create command buttons to call forms in edit, add or read-only mode and demand a password from the individual before they enter.
    2. Create your own toolbars, menubars and shortcut menus that you want the user to use, and omit anything that would allow them access to the Main Database window...turning off these features when you make the Master Form your startup form...you can create your own command button which allows you to access the design view of any of your objects, but you must know and use the password so that you can press shift to re-enter the database...but remember so can everyone else, so you would use the command button on exit and NOT enter a password into the dialog when you didn't want to perform database maintenance upon reentry...I used this in the security of our own database here within our department and set no group options...individuals have access only to what is given to them, and they have passwords to access. Even with passwords NO one but the lead secretary has access to any design view of any db objects. I pieced it together from code supplied from all over woody's lounge. Will send it but you will need to adapt it to suit yourself...This is part of the actual lesson my students do to protect their databases in their final projects. Code is included. Good luck...
    Attached Files Attached Files
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Protecting Forms/Tables (Access 2000)

    Hi again,

    I take it you are not activating Access User Security in what you do. If that is the case, then there are a couple of ways that users with a bit of knowledge could get access to the design of forms, reports and even code. <UL><LI>One is to simply import all the objects except modules into a new database. When that is done, the user can do pretty much anything they want, including looking at code behind the protected forms where they would be able to see the password, as you show in your routine cmdOpenEmpForm. <LI>A second situation is where you have a multi-user database, and someone opens the database (or presses F11, etc.) while the administrator has the ability to bypass startup turned on. That can effectively be solved of course by splitting the database and putting a dedicated front-end on each workstation; a recommended approach for a number of other reasons. <LI>Finally, if someone (or some thing, such as hardware, data or network problems) does something unexpected that causes an error during code execution, if you don't have robust error-handling implemented, they will in all liklihood get dumped into the VBA editor/de######. At that point, they can stop the de######, and open any code in the database, also exposing any passwords in the code, and if they are experienced, they will discover that also can be used to open the form in design mode.[/list]We worry about these kinds of things a fair bit with some of the projects we work on, and we haven't found any reliable way of adequately protecting a database without using Access User Security and deploying MDE versions of front-ends. I would like to encourage other opinions or suggestions on the subject.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •