G
Guest
Hi.
Wanting to add users to security groups, I purchased a book from wrox that
gives me the following DAO function:
Public Function CreatuserAccount(strUserName As String, _
strPID As String, strPassword As String)
Dim wrk As DAO.Workspace
Dim usr As DAO.User
Set wrk = DBEngine(0)
On Error GoTo CreatuserAccountErr
Set usr = wrk.CreateUser(strUserName, strPID, strPassword)
wrk.Users.Append usr
CreatuserAccountErr:
Set usr = Nothing
Set wrk = Nothing
End Function
This code looks great. But, I don't know how to use it. I created a module
and put the function in. But, what's the next step? Any help would be
appreciated. Thank you.
Wanting to add users to security groups, I purchased a book from wrox that
gives me the following DAO function:
Public Function CreatuserAccount(strUserName As String, _
strPID As String, strPassword As String)
Dim wrk As DAO.Workspace
Dim usr As DAO.User
Set wrk = DBEngine(0)
On Error GoTo CreatuserAccountErr
Set usr = wrk.CreateUser(strUserName, strPID, strPassword)
wrk.Users.Append usr
CreatuserAccountErr:
Set usr = Nothing
Set wrk = Nothing
End Function
This code looks great. But, I don't know how to use it. I created a module
and put the function in. But, what's the next step? Any help would be
appreciated. Thank you.