creating user in access security

Bigpapou
06-12-2001, 12:32 PM
I'm all out of ideas on this one!
Here's my problem: I want to add a user in my access ecurity system. There's only one line who don't want to work... I don't know why can anybody help.
My code:

Function CreateUser(Name, Pid, Optional Password)
On Error GoTo error
Dim NewUser As User
Dim wsp As Workspace

Set wsp = DBEngine(0)
Set NewUser = wsp.CreateUser(Name, Pid, Password)

wsp.Users.Append NewUser '<= won't work
Call AddUserToGroup("Users")
Exit Function
erreur:
MsgBox "The CreateUser module didn't work!"
Exit Function
End Function

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum