Results 1 to 2 of 2
  1. #1
    AzizSader is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    37

    permission in database form

    dear all
    How can the work permission users to Form (frm_Employees) so that, for example, a (admin) has full permission and (user) has only added permission
    I hope the amendment to the attached file
    Attached Files Attached Files

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Of course you need a table for user security. Then you set the form permissions by code using the OnOpenEvent. Example:
    tblUserSecurity_Sec
    recid Primary Key
    dev yes/no
    admn yes/no
    sprsvr yes/no
    data yes/no
    reado yes/no

    Permissions would be set when the user Logs In.

    ' DETERMINE USER SECURITY LEVEL
    ' (strSecLvl is a global variable set in the modGlbVars module)
    If DLookup("[reado]", "tblUserSecurity_Sec", "[userID]='" & Me.txtUserID.Value & "'") = -1 Then
    strSecLvl = "Read Only"
    End If
    Then use Code on the form Open.



    Select Case (strSecLvl) 'Code in Module.
    Case "Developer"
    'Set appropriate form properties for Developer
    Me.AllowAdditions = True
    Me.AllowEdits = True
    Me.AllowDeletions = True




    Case Else
    MsgBox "The user name with which you have logged in " & _
    "is not cleared for access to this screen." & vbCrLf & vbCrLf & _
    "Please check your security settings.", vbCritical, "Security Error !"
    DoCmd.Close acForm, Me.Name
    End Select
    I did not download your db.

    HTH

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Microsoft Access 2.0 Database User and Group Permission Error
    By uralbystreet in forum Code Repository
    Replies: 5
    Last Post: 02-10-2014, 10:33 AM
  2. you do not have the necessary permission
    By stone in forum Programming
    Replies: 5
    Last Post: 04-19-2013, 12:59 AM
  3. Replies: 7
    Last Post: 02-22-2013, 04:57 PM
  4. Permission
    By Jvalencia in forum Access
    Replies: 1
    Last Post: 09-01-2011, 02:22 PM
  5. Replies: 3
    Last Post: 12-08-2009, 01:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums