Append User to group

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top