HI,
I am trying to change permissions so that users can export tables to a backup file, and then once the backup is created, change their permissions back so that they cannot open the backup. (so that the backup cannot be changed.
This is my code :
'********************************
Dim W As Workspace, U As User
Set db = CurrentDb()
Set W = DBEngine.CreateWorkspace("NewWS", "AdminGuy", "AGPassword"
Set U = W.Users("user01"
U.Groups.Append U.CreateGroup("Admins"
W.Users.Refresh
W.Groups.Refresh
W.Databases.Refresh
'export code here
'********************************
The problem I have is that the code updates the workgroup file to add Admins group to User01, but it does not take effect until you log out and repoen the mdb. I have tried refreshing eberything (as you can see).
Any help greatly appreciated.
Rich
Lead Developer
I am trying to change permissions so that users can export tables to a backup file, and then once the backup is created, change their permissions back so that they cannot open the backup. (so that the backup cannot be changed.
This is my code :
'********************************
Dim W As Workspace, U As User
Set db = CurrentDb()
Set W = DBEngine.CreateWorkspace("NewWS", "AdminGuy", "AGPassword"
Set U = W.Users("user01"
U.Groups.Append U.CreateGroup("Admins"
W.Users.Refresh
W.Groups.Refresh
W.Databases.Refresh
'export code here
'********************************
The problem I have is that the code updates the workgroup file to add Admins group to User01, but it does not take effect until you log out and repoen the mdb. I have tried refreshing eberything (as you can see).
Any help greatly appreciated.
Rich
Lead Developer