G
Gwen
Hi,
Once again, Please help
The below function (courtesy of someone in the message
board)will only work with one member of the Admins group.
This how I am calling the function
If fncUserIsInGroup("Admins") = True Then
DoCmd.OpenQuery ("qmakTest")
end if
Function fncUserIsInGroup(GroupName As String) As Boolean
'Returns True if the current user is a member of the
specified ' security group.
Dim ws As Workspace
Set ws = DBEngine.Workspaces(0)
'Debug.Print GroupName
'Debug.Print CurrentUser
On Error Resume Next
fncUserIsInGroup = (ws.Users(CurrentUser).Groups
(GroupName).name = GroupName)
'Debug.Print GroupName
Set ws = Nothing
End Function
Obviously, I missing something.
Thanks
Gwen
Once again, Please help
The below function (courtesy of someone in the message
board)will only work with one member of the Admins group.
This how I am calling the function
If fncUserIsInGroup("Admins") = True Then
DoCmd.OpenQuery ("qmakTest")
end if
Function fncUserIsInGroup(GroupName As String) As Boolean
'Returns True if the current user is a member of the
specified ' security group.
Dim ws As Workspace
Set ws = DBEngine.Workspaces(0)
'Debug.Print GroupName
'Debug.Print CurrentUser
On Error Resume Next
fncUserIsInGroup = (ws.Users(CurrentUser).Groups
(GroupName).name = GroupName)
'Debug.Print GroupName
Set ws = Nothing
End Function
Obviously, I missing something.
Thanks
Gwen