How to implement user-level security in Access 2007

后端 未结 3 979
说谎
说谎 2020-12-11 11:25

So after some digging I realize that there is no built in user level security option for Access 2007. What I need to do is restrict records that users can edit based on who

3条回答
  •  心在旅途
    2020-12-11 12:25

    I have been facing this problem too. My solution (which hasn't been broken yet) is to do exactly that. Make a user's table with passwords and a log in form which reads the table for User name, password and user type. I have used two ways to proceed from there: Case statement to open specific navigation forms for that user's functions or a global variable (in a module (enumeration helps)) and an getter function that is checked within each form's open events and changes properties like AllowEdits, and AllowAdditions and even cancel the form opening if it's administrative stuff.

    The most important part of this set up is making sure the users are using Access Runtime. If they use the Access version you are developing in they can snoop a little bit and get around this.

    Make sure you hide the user's table.

    Access runtime can be forced by making a shortcut to the DB and adding /runtime to the end of the shortcut path (with a space).

    It's not perfect, but it works for my purposes and It might work for your's.

    I did dot this in 2010, but 2007 should be pretty much the same.

提交回复
热议问题