|
Question : User-Level Security
|
|
I have an Access 2003 database, SQL Server 2005 Back End and the Access DB is protected by a Workgroup and associated User-Level Security.
I need to add a few users to the database but control what they can see, edit, etc...
1. A User must not have access to the tables, only be able to see certain forms and be able to see the associated data for searching purposes but no data entry.
2. Another user again no tables, but be able to see certain forms and edit existing data.
3. Another user same as 2 but add records.
No user should have the ability to delete records other than me.
Can this be done.
|
|
Answer : User-Level Security
|
|
You would typically put this type of code in the Form's Load or Open event:
Sub Form_Load()
If IsGroupMember("UpdateDataMembers") Then Me.AllowEdits = True Me.AllowDeletions = True Me.AllowAdditions = True ElseIf IsGroupMember("ReadOnlyMembers") Then Me.AllowEdits = False Me.AllowDeletions = False Me.AllowAdditions = False End If
End Sub
If, as you mentioned in your original question, there are certain forms only certain groups can access, you can use the builtin security menus to disallow certain groups the ability to open them, or you can enable/disable the buttons or commands necessary to open those forms, based on the user's Group membership (same scenario as above).
|
|
|
|