Hi all
I need to Delete a user from a database open with user that
do not have permision to do so
I have created a function that will create new workspace
with UserName and Password of one that can
The function run O.K.
But the deleted user is only realy deleted after I restart
access
I don't know how to refresh the main workspace with
changes I made in the new workspace
Can you please help
Here is My Function
Sub DeleteUserFromGroupUser(sUserName As String)
Dim wrkDefault As Workspace, sName As String
Dim grpTemp As Group
On Error Resume Next
Set wrkDefault = DBEngine.CreateWorkspace
("test", "SuperUser", "Password")
Set grpTemp = wrkDefault.Groups("users")
'Remove User From Users Group
grpTemp.Users.Delete sUserName
grpTemp.Users.Refresh
'Remove User From Workgroup
wrkDefault.Users.Delete sUserName
wrkDefault.Users.Refresh
DBEngine.Idle
Set grpTemp = Nothing
wrkDefault.Close
Set wrkDefault = Nothing
DBEngine.Workspaces(0).Users.Refresh
DBEngine.Workspaces(0).Groups("users").Users.Refre sh
end sub
..