CreateUser Method (DAO)

Microsoft DAO 3.60

CreateUser Method

           

Creates a new User object (Microsoft Jet workspaces only).

Syntax

Set user = object.CreateUser (name, pid, password)

The CreateUser method syntax has these parts.

Part Description
user An object variable that represents the User object you want to create.
object An object variable that represents the Group or Workspace object for which you want to create the new User object.
name Optional. A Variant (String subtype) that uniquely names the new User object. See the Name property for details on valid User names.
pid Optional. A Variant (String subtype) containing the PID of a user account. The identifier must contain from 4 to 20 alphanumeric characters. See the PID property for more information on valid personal identifiers.
password Optional. A Variant (String subtype) containing the password for the new User object. The password can be up to 14 characters long and can include any characters except the ASCII character 0 (null). See the Password property for more information on valid passwords.

Remarks

If you omit one or more of the optional parts when you use the CreateUser method, you can use an appropriate assignment statement to set or reset the corresponding property before you append the new object to a collection. After you append the object, you can alter some but not all of its property settings. See the PID, Name, and Password property topics for more details.

If name refers to an object that is already a member of the collection, a run-time error occurs when you use the Append method.

To remove a User object from the Users collection, use the Delete method on the collection.