Hi,
I have a report which details users in database and a function which pulls the User Group assosciations from Sec.mdw file. the function works great on a single detail. (and only on the currentuser when report is run), and I get error 3265 for EVERY other detail on the report.
Here is the Function:
I am passing the variable as:
in the conrtolsource of the report control displaying the data.
Any help would be appreciated.
Donald M
I have a report which details users in database and a function which pulls the User Group assosciations from Sec.mdw file. the function works great on a single detail. (and only on the currentuser when report is run), and I get error 3265 for EVERY other detail on the report.
Here is the Function:
Code:
'List Groups User is a member of:
Function faq_ListGroupsOfUser(StrUserIDName As String)
Dim ws As Workspace
Dim usr As User
Dim i As Integer
Dim strUserGroups As String
Set ws = DBEngine.Workspaces(0)
[COLOR=black yellow]Set usr = ws.Users(StrUserIDName)[/color]
For i = 0 To usr.Groups.Count - 1
If i >= 1 Then
faq_ListGroupsOfUser = faq_ListGroupsOfUser & ", " & usr.Groups(i).Name
'Debug.Print usr.Groups(i).Name
Else
faq_ListGroupsOfUser = usr.Groups(i).Name
End If
Next i
'Debug.Print strUserGroups
End Function
I am passing the variable as:
Code:
=faq_ListGroupsOfUser([txtClerkLogin])
Any help would be appreciated.
Donald M