J
Jim Bunton
How do I append a user to a group?
Access 97 - Windows 2000
(I have full admin permissions in both)
____________________________
in immediate mode:-
set myUser=dbengine.Workspaces(0).CreateUser("aNewUser", "123456", "Pwd")
This works fine
thus
? dbengine.Workspaces(0).Users("aNewUser").Name
Returns "aNewUser"
dbengine.Workspaces(0).Users.Append myUser
Runs Ok -
the User 'aNewUser' is listed using
Tools>Security>user & Group Acounts
BUT 'aNewUser' isn't a member or any groups
? dbengine.Workspaces(0).Groups("AshtonStSupervisor").Name
Returns "AshtonStSupervisor"
dbengine.Workspaces(0).users.Refresh
dbengine.Workspaces(0).users("aNewUser").Name
Returns ("aNewUser").
set myUser=dbengine.Workspaces(0).Users("aNewUser")
? myUser.name
Returns "aNewUser"
dbengine.Workspaces(0).Groups("AshtonStSupervisor").Users.Append myUser
FAILS - Err 3219 Invalid Operation
Access 97 - Windows 2000
(I have full admin permissions in both)
____________________________
in immediate mode:-
set myUser=dbengine.Workspaces(0).CreateUser("aNewUser", "123456", "Pwd")
This works fine
thus
? dbengine.Workspaces(0).Users("aNewUser").Name
Returns "aNewUser"
dbengine.Workspaces(0).Users.Append myUser
Runs Ok -
the User 'aNewUser' is listed using
Tools>Security>user & Group Acounts
BUT 'aNewUser' isn't a member or any groups
? dbengine.Workspaces(0).Groups("AshtonStSupervisor").Name
Returns "AshtonStSupervisor"
dbengine.Workspaces(0).users.Refresh
dbengine.Workspaces(0).users("aNewUser").Name
Returns ("aNewUser").
set myUser=dbengine.Workspaces(0).Users("aNewUser")
? myUser.name
Returns "aNewUser"
dbengine.Workspaces(0).Groups("AshtonStSupervisor").Users.Append myUser
FAILS - Err 3219 Invalid Operation