Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jul 2007
    Location
    North Carolina, USA
    Posts
    71
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Using groups to specify startup form/menus (2003)

    More on <post:=665,778>post 665,778</post:> about using the User Logins in a drop down.

    Is there a way to use the Groups each login is associated with the determine the Startup Form and Menu/Toolbars each user gets?

    If Current User =
    Then Open _____.

    Any help would be appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Using groups to specify startup form/menus (2003)

    The following function will return a string with all groups the specified user is a member of:


    Function ListGroupsOfUser(strUserName As String) As String
    Dim usr As DAO.User
    Dim ws As DAO.Workspace
    Dim i As Integer
    Dim strRet As String

    Set ws = DBEngine.Workspaces(0)
    Set usr = ws.Users(strUserName)
    For i = 0 To usr.Groups.Count - 1
    strRet = strRet & ";" & usr.Groups(i).Name
    Next i
    ListGroupsOfUser = Mid(strRet, 2)
    Set usr = Nothing
    Set ws = Nothing
    End Function

    To get the list of groups for the current user, use

    ListGroupsOfUser(CurrentUser)

  3. #3
    Star Lounger
    Join Date
    Jul 2007
    Location
    North Carolina, USA
    Posts
    71
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Using groups to specify startup form/menus (2003)

    Thank you for the help on this one. I am still working on making the permissions work properly so I haven't gotten a chance to test this out.

Posting Permissions

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