Just updated my db, which was working fine, with some new features. Now some of my users are not able to get into it because it "Cannot find project or library" for the below module. This module checks the currentuser to see if they are a member of a certain security group so that certain buttons are available or not. This code DID NOT change between the two versions. The error indicates the LCase statement. Any ideas as to what went wrong and how to correct it?
Public Function UserGroups()
Dim wrkDefault As Workspace
Dim usrNew As User
Dim usrLoop As User
Dim grpNew As Group
Dim grpLoop As Group
Dim grpMember As Group
Dim cuser As String
Dim Auth As Boolean
Dim usermatch As String
Dim strGroup As String
Set wrkDefault = DBEngine.Workspaces(0)
cuser = ""
usermatch = ""
Auth = False
strGroup = ""
With wrkDefault
For Each usrLoop In .Users
For Each grpLoop In usrLoop.Groups
If LCase(usrLoop.Name) = LCase(CurrentUser()) Then
Auth = True
strGroup = strGroup & grpLoop.Name & "/"
End If
Next grpLoop
Next usrLoop
End With
UserGroups = strGroup
End Function
Autoeng
Public Function UserGroups()
Dim wrkDefault As Workspace
Dim usrNew As User
Dim usrLoop As User
Dim grpNew As Group
Dim grpLoop As Group
Dim grpMember As Group
Dim cuser As String
Dim Auth As Boolean
Dim usermatch As String
Dim strGroup As String
Set wrkDefault = DBEngine.Workspaces(0)
cuser = ""
usermatch = ""
Auth = False
strGroup = ""
With wrkDefault
For Each usrLoop In .Users
For Each grpLoop In usrLoop.Groups
If LCase(usrLoop.Name) = LCase(CurrentUser()) Then
Auth = True
strGroup = strGroup & grpLoop.Name & "/"
End If
Next grpLoop
Next usrLoop
End With
UserGroups = strGroup
End Function
Autoeng