T
Tony_VBACoder
In Access 2002, I am trying to create a new user "Homer
Simpson" (I want a space between First and Last Name) with
no password and a PID of "hsimpson". What is the syntax
for this when the first parameter of the CREATE USER
statement has a space in it, 2nd parameter is empty and
3rd parameter is PID? I have tried the following but am
confused on how Access will interpret the parameters. I
can create the user successfully if I use the
Tools/Security/User and Group Accounts method. However,
if I run the code below, a user of Homer gets created,
with Simpson set as the password and hsimpson as the PID:
********************************************************
Dim conDatabase As ADODB.Connection
Set conDatabase = Application.CurrentProject.Connection
conDatabase.Execute "CREATE USER Homer Simpson hsimpson"
********************************************************
I have tried the ADO method below with success, however, I
can't find any place where I can set the PID:
Dim cat As ADOX.Catalog
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
cat.Users.Append "Homer Simpson",""
Simpson" (I want a space between First and Last Name) with
no password and a PID of "hsimpson". What is the syntax
for this when the first parameter of the CREATE USER
statement has a space in it, 2nd parameter is empty and
3rd parameter is PID? I have tried the following but am
confused on how Access will interpret the parameters. I
can create the user successfully if I use the
Tools/Security/User and Group Accounts method. However,
if I run the code below, a user of Homer gets created,
with Simpson set as the password and hsimpson as the PID:
********************************************************
Dim conDatabase As ADODB.Connection
Set conDatabase = Application.CurrentProject.Connection
conDatabase.Execute "CREATE USER Homer Simpson hsimpson"
********************************************************
I have tried the ADO method below with success, however, I
can't find any place where I can set the PID:
Dim cat As ADOX.Catalog
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
cat.Users.Append "Homer Simpson",""