Results 1 to 4 of 4
  1. #1
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283

    Form level access

    Hello,



    I was wondering if you could help me figure this out. I have a form with multiple textboxes where data needs to be updated. But I only want a couple people to be able to have the capability to change data or add data, and everyone else have read only access. Does anyone know how to make this happen?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    make a table ,tUsers and have the userIDs in it of those who can edit.
    put an invisible textbox txtUser on the form
    on FORM LOAD event, put

    Code:
    private mbCanEdit as Boolean
    
    sub Form_Load()
      txtUser = Environ("Username")    'put current user in the box
           'see if they are in the edit list
      mbCanEdit =  txtUser = dlookup("[UserID]","tUsers","[UserID]='" & txtUser & "'") & "" 
      me.AllowEdits = mbCanEdit       'allow edits here
    end sub

  3. #3
    MTSPEER is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    283
    so do I change the properties of the form to no edits first then do this? And I put the user ID in the textbox that I want to be able to edit? what if I want multiple people?

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    You may want to research Role Based Access Control (RBAC).
    If you only have a couple of Roles (ReadOnly, Edit and probably Admin),
    you could use the code ranman suggested (you may need additional logic depending on you detailed requirements) when you load or open a form.

    It is logic when you load or open the form
    This user must be approved user and must be in the table and must have Edit rights....

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

Similar Threads

  1. Access 2010 Runtime Advance Access Level
    By Charles CL in forum Access
    Replies: 2
    Last Post: 01-26-2016, 07:16 AM
  2. Linking Tables at the Table Level Vs. the Query Level
    By Tammy in forum Database Design
    Replies: 3
    Last Post: 12-03-2014, 01:34 PM
  3. Access level?
    By lithium in forum Security
    Replies: 2
    Last Post: 11-02-2014, 03:35 PM
  4. Replies: 3
    Last Post: 01-12-2012, 02:04 PM
  5. Field Level Access
    By botts121 in forum Programming
    Replies: 0
    Last Post: 07-09-2009, 11:59 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