OpenAccessProject Method

Microsoft Access Visual Basic

OpenAccessProject Method

       

You can use the OpenAccessProject method to open an existing Microsoft Access project (.adp) as the current Access project in the Microsoft Access window.

expression.OpenAccessProject(filepath, Exclusive)

expression   Required. An expression that returns one of the objects in the Applies To list.

filepath  Required String. A string expression that is the name of the existing 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

Note   If you don't supply the filename extension, .adp is appended to the filename. You can use this method or the OpenCurrentDatabase method to open .adp files.

Exclusive  Optional Boolean.

Remarks

The OpenAccessProject method enables you to open an existing project from within Microsoft Access or another application through Automation, formally called OLE Automation. For example, you can use the OpenAccessProject method from Microsoft Excel to open the Northwind.adp sample database in the Microsoft Access window. Once you have created an instance of Microsoft Access from another application, you must also create a new Access project or specify a particular Access project to open. This Access project opens in the Microsoft Access window.

If you have already opened a project and wish to open another project in the Microsoft Access window, you can use the CloseCurrentDatabase method to close the first Access project before opening another.

Note   To open an Access database (.mdb), use the OpenCurrentDatabase method of the Application object.