Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2007
    Posts
    3

    Question Unanswered: User Group Permissions on a Subform

    Hi All
    Have created a database (Access 2003) with security set up and different levels of User and Group Permissions. The interface is based on a master form with tab control pages, each with a separate form.

    All works just dandy, except for one tab control page on which there is a form with an attached subform (after a lot of experimenting this seems the best way to handle the data in it). One user group must have full access to data editing in the form but no access to data editing in the subform.

    Problem I have is that no matter what combination of permissions I apply (to forms, tables, tables and forms, tried running a query instead . . .), the restricted group can't data edit but they can't see the data either, which they must be able to do. Blank box every time!

    In a nutshell I'm asking: can this be done in subforms? is the subform inheriting something from the parent form? have I just missed the plot altogether?

    Would be most grateful for any ideas.

    S

  2. #2
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Are you sure there is data for the subform? This is not so much a question as to is there any data at all, but does the subform show data if you are not using security? I do not use Access security because I feel it is a lot more difficult than it needs to be, so I really can't help with the security side. But, I wanted to see if you knew the subform was showing data without the security present.

  3. #3
    Join Date
    Oct 2007
    Posts
    3
    Hi GolferGuy.

    Access security is certainly more difficult than it needs to be for me! To your question, some of the records have data in these fields and it shows perfectly for less restricted users. To put it in context the fields in the subform serve to allocate values to the parent form and consist of two text fields and a drop-down.

    Many thanks.
    S.

  4. #4
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    OK, you have data in the subform, and somehow security is keeping it from showing. Some people need to see it, and others need to be able to edit it, correct? Besides Access security, is there a way that you can tell, based on something about WHO the user is, that your application can set the Allow Edit property for the subform to No?, If you can, be sure the code also sets the Allow Edit property to Yes for the people that should be able to edit the data in the subform. If your program can not make this determination, I'm at a loss as to how to help. Sorry.

  5. #5
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5
    take the recordsource directly from the subform and place it in a query - if you are referencing a value on the main form from this query then hardcode in a value in the criteria row - can you see data?(make sure what you are quering willl return records under normal circumstances : ie - use different criteria to validate)
    Dale Houston, TX

  6. #6
    Join Date
    Oct 2007
    Posts
    3
    Thanks guys. I shall give your suggestions a go in the next couple of days and let you know how I get on. Much appreciated.

    S.

  7. #7
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Regarding the security...
    One of the methods I use verses Access Security and on a tab control is that I'll set the sourceobject of the subform on that tab once that tab is selected ex...
    If Me!TabCtl47 = 5 Then
    If isAdmin() = True Then <- isAdmin function returns true if user is in AdminTable
    Me.subComplaints.SourceObject = "subComplaints"
    Else
    Me.subComplaints.SourceObject = "subNoAccess"
    End If
    End If

    Also, I use the getuser() function in the code bank to get the user loginID and the IsAdmin function in this example to see if the user's loginID matches a loginID in a security table I created. If the user's loginID is in the security table, the sourceobject of the subform is populated. If not, the sourceobject of the subform is populated with a subform which just has a text box in it saying "Insufficient Security to see this Subform."

    If you're interested, here's the link to the getuser() routine and isAdmin function to get the loginID of the user and see if they are in an admin (security) table: http://www.dbforums.com/showpost.php...0&postcount=20
    Last edited by pkstormy; 10-15-07 at 17:15.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •