User level security for forms

ShawnRieder

New member
Local time
Today, 14:21
Joined
Nov 14, 2002
Messages
6
Anyone out there have any experience with user level access to a form? I have 3 types of users and an input form for each user type and I need to do one of the following:

Allow users to edit/add data in their own input form but only view data in the other user types' forms

-or-

Only be able to access the input forms that correspond to their job function.

HELP!

Please feel free to email me directly regarding this topic at Shawn_Rieder@apl.com
 
I have dabbled with this feature :

I am not too sure whether what you are trying to do is possible with the security features that Access 97 offers.....:(

Security permissions can be granted either for a group or on a per user basis. This is carried out at form / query/table etc level. If you grant user#1 access to add / update to the base table you cannnot prevent them from directly accessing the table records for other users.

:confused:
(Can you create a form / table pair for each user?- you could then give appropriate read/update access specifically to each user)


However, if you grant user#1 Run permission to his form and no Run permission on the other forms - user#1 accessing the others data will be prevented at FORM level.

You will need to

  1. [*Create a workgroup information file
    [*Security/Users and Group Accounts : Create three users of group User
    [*Security/Users and Group Permissions (Forms):Grant each user (NOT group permissions) Open/Run access to their appropriate form
    [*Security/Users and Group Permissions (Tables):Grant each user (NOT group permissions) Add/Update access to the underlying table
    [/list=1]

    Hope this helps.

    GJT
 
I am running Win 2K. I cannot split it among tables, the nature of the information (mostly dates for different events for a shipment) precludes this as there is only one field of information that is unique.
 
Shawn:

I don't understand your last post. It doesn't matter if all information is stored in the same table or not to security. You can create forms for each user group and then a limited user is only allowed to use the limited form and same for the full access user. You just put the appropriate fields on the form.

Autoeng
 
You can use the CurrentUser() function if you are using Access security workgroups and permissions. The CurrentUser() function will allow you to test for the users workgroup and then use VBA commands to control what you users can do. Below is an example in the forms OnOpen event that will test for the user workgroups UserGroup1 or UserGroup2 and either allow adding, editing, deleting records or not depending on their workgroup (CurrentUser)...

Code:
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
    
    If CurrentUser = "UserGroup1" Then
        Me.AllowAdditions = True
        Me.AllowEdits = True
        Me.AllowDeletions = True
    ElseIf CurrentUser = "UserGroup2" Then
        Me.AllowAdditions = True
        Me.AllowEdits = False
        Me.AllowDeletions = False
    Else
        Me.AllowAdditions = False
        Me.AllowEdits = False
        Me.AllowDeletions = False
    End If
    
Exit_Form_Open:
    Exit Sub
    
Err_Form_Open:
    MsgBox Err.Number, Err.Description
    Resume Exit_Form_Open
    
End Sub
HTH
 

Users who are viewing this thread

Back
Top Bottom