Results 1 to 2 of 2
  1. #1
    upzaw2000 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    4

    Filter Query Name Listed in Table that lists if employee has access.


    Need assistance. I recently started using access and have created a database for my team to preform audit reviews. We are live and its working properly. Now I am trying to add extra security to make sure people only have access to what they need to see.

    Currently each associate has their own button in a form where they select their name and it loads all of their queue.
    I want to make it so that according to their windows ID listed in a table it filters the form which the query name for the filter to apply is listed in that table also. This way I can remove everyones individual button to view their queue and adding new users will be as easy as updating the table and creating a filter query for them. The filter query names are currently listed in a table next to their name.


    Form that contains button = SplashPage
    Form that loads = Audits
    Table that contains staffs windows IDs = [QA Associates]![QCUserIds]
    Table that containts staff Filter Query Names= [QA Associates]![AuditFilterName]


    This code I have right now

    HTML Code:
    Function Open_Norma_Audits()
    On Error GoTo Open_Norma_Audits_Err
        With CodeContextObject
            If (.GetNetUser = DLookup("[QCUserIDs]", "[QA Associates]", " [QA Associates]![QCUserIds]='" & .GetNetUser & "'")) Then
                DoCmd.OpenForm "Audits", acNormal, "FilterbyNormaAudits", "", , acNormal
                DoCmd.MoveSize 9300, 0, 10500, 10500
                DoCmd.OpenForm "Checklist Non Critical", acNormal, "", "", acReadOnly, acNormal
                DoCmd.MoveSize , 5000
            Else
                Beep
                MsgBox "You do not have acces", vbOKOnly, "DENIED"
            End If
        End With
    
    Open_Norma_Audits_Exit:
        Exit Function
    Open_Norma_Audits_Err:
        MsgBox Error$
        Resume Open_Norma_Audits_Exit
    End Function

  2. #2
    upzaw2000 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2014
    Posts
    4
    Problem Solves.... I didn't know that the Filter section could be a calculation which makes this really easy.... lol thanks!

    =DLookUp("[AuditFilterName]","[QA Associates]"," [QA Associates]![QCUserIds]='" & [GetNetUser] & "'")

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

Similar Threads

  1. Replies: 9
    Last Post: 05-13-2014, 08:22 AM
  2. Replies: 1
    Last Post: 04-14-2014, 11:44 AM
  3. Replies: 1
    Last Post: 08-21-2013, 12:36 PM
  4. Replies: 3
    Last Post: 03-07-2013, 10:44 AM
  5. Replies: 4
    Last Post: 01-21-2013, 11:20 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