This article was previously published under Q210418
Advanced: Requires expert coding, interoperability, and multiuser skills.
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
View products that this article applies to.
Function CUser (uname As String, upin As String, upwd As String, _
gname As String)
Dim u As User, w As WorkSpace, g As Group
Set w = dbengine.workspaces(0) 'The default workspace.
Set u = w.CreateUser(uname, upin, upwd) 'Create a user for the
'Access session.
w.users.Append u 'Add user to workspace.
w.users.Refresh
Set g = w.groups(gname)
Set u = g.CreateUser(uname) 'Create a user for a
group.
g.users.Append u 'Add new user to group.
g.users.Refresh
End Function
? CUser ("MyName","1234","MyName","Users")
Keywords: KB210418, kbprogramming, kbhowto, kbdta