Application.CreateAccessProject method (Access)
Use the CreateAccessProject method to create a new Microsoft Access project (.adp) on disk.
Syntax
expression.CreateAccessProject (filepath, Connect)
expression A variable that represents an Application object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
filepath | Required | String | A string expression that is the name of the new Access project, including the path name and the file name extension. If your network supports it, you can also specify a network path in the following form: \Server\Share\Folder\Filename.adp |
Connect | Optional | Variant | A string expression that's the valid connection string for the Access project. See the ADO ConnectionString property for details about this string. |
Return value
Nothing
Remarks
The CreateAccessProject method enables you to create a new Access project from within Microsoft Access or another application through Automation, formally called OLE Automation. For example, you can use the CreateAccessProject method from Microsoft Excel to create a new Access project on disk. After you have created an instance of Microsoft Access from another application, you must also create a new Access project.
If the Access project identified by projname already exists, an error occurs.
To create and open a new Access project as the current Access project in the Access window, use the NewAccessProject method of the Application object.
To open an existing Access project as the current Access project in the Access window, use the OpenAccessProject method of the Application object.
Example
The following example creates a Microsoft Access project named "Order Entry.adp" on drive C.
Application.CreateAccessProject "C:\Order Entry.adp"
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기