I am using code to list the groups a specific user belongs to with the following code:
That code works fine the first time. But when I manually REMOVE a group using the "User and Group Accounts" .. then run my code to list the groups, the same groups are listed as if it didn't recognize that I removed a group. What could be the problem. I don't understand.
Code:
Set wrkDefault = DBEngine.Workspaces(0)
usrNam = "tanya"
Set usr = wrkDefault.Users(usrNam)
For Each grp In usr.Groups
Debug.Print grp.Name
Next grp
That code works fine the first time. But when I manually REMOVE a group using the "User and Group Accounts" .. then run my code to list the groups, the same groups are listed as if it didn't recognize that I removed a group. What could be the problem. I don't understand.