Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Users and groups 1

Status
Not open for further replies.

Cagliostro

Programmer
Sep 13, 2000
4,226
GB
Hi,
How can I make an existent user a member of an existent group using VBA? Ion Filipski
1c.bmp


filipski@excite.com
 
See the function below. This code assumes both UserName and GroupName already exist.

Code:
    Dim g As Group, u As User, ws As Workspace
    
    Set ws = DBEngine.Workspaces(0)
    Set u = ws.Users("UserName")
    Set g = u.CreateGroup("GroupName")
    u.Groups.Append g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top