Application.CreateNewWorkgroupFile Method

Access Developer Reference

Creates a new workgroup file so that a user can securely access a database.

Syntax

expression.CreateNewWorkgroupFile(Path, Name, Company, WorkgroupID, Replace)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Path Optional String The path of the new workgroup file. If the path is invalid, an error occurs. Default is a zero-length string.
Name Optional String The name of the user creating the file. Default is a zero-length string.
Company Optional String The company of the user creating the file. Default is a zero-length string.
WorkgroupID Optional String The name of the workgroup. Default is a zero-length string string.
Replace Optional Boolean Specifies whether to replace the workgroup file in the directory specified by Path if it exists already. Default is False.

Return Value
Nothing

Remarks

If a workgroup file already exists in the directory specified by Path, and Replace is not True, an error occurs.

Example

This example creates a new workgroup file in the specified directory with the specified user information. If a workgroup file for this user already exists in the specified directory, Microsoft Access replaces it.

Visual Basic for Applications
  Application.CreateNewWorkgroupFile _
    Path:="C:\Documents and Settings\Wendy Vasse" _
    & "\Application Data\Microsoft\Access", _
    Name:="Wendy Vasse", _
    Company:="Microsoft", _
    Replace:=True

See Also