>
Password Property
Applies To
User Object.
Description
Sets the password for a user account. This property setting is write-only for new objects not yet appended to a collection, and is not available for existing objects.
Settings
The setting is a string expression that can be up to 14 characters long and can include any characters except the ASCII character 0 (null). The data type is String.
Remarks
Set the Password property along with the PID property when you create a new User object.
Use the NewPassword method to change the Password property setting for an existing User object. To clear a password, set the newpassword argument of the NewPassword method to a zero-length string ("").
Passwords are case-sensitive.
Note
If you don't have access permission, you can't change the password of any other user.
See Also
NewPassword Method, Permissions Property, PID Property, UserName Property.
Example
This example creates a new User object and sets the Name, PID, and Password properties for the new object before appending it to the Users collection.
Dim usrMyself As User, wrkDefault As Workspace
...
Set wrkDefault = DBEngine.Workspaces(0) ' Get default workspace.
' Create, specify, and append new User object.
Set usrMyself = wrkDefault.CreateUser("Pat Smith")
usrMyself.PID = "abc123DEF456"
usrMyself.Password = "MySecret"
wrkDefault.Users.Append usrMyself