Application.NewCurrentDatabase (Access)
Creates a new Microsoft Access database.
You can use this method to create a new database from another application that is controlling Microsoft Access through Automation, formerly called OLE Automation. For example, you can use the NewCurrentDatabase method from Microsoft Excel to create a new database in the Access window. The NewCurrentDatabase method enables you to create a new Access database from another application through Automation. After you have created an instance of Access from another application, you must also create a new database. This database opens in the Access window.
NewCurrentDatabase (filepath, FileFormat, Template, SiteAddress, ListID)
Dim strfilepath As String: strfilepath =
NewCurrentDatabase filepath:=strfilepath
Arguments
The following argument is required
filepath (String) - A string expression that is the name of a new database file, 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.
Optional arguments
The following arguments are optional
FileFormat (AcNewDatabaseFormat) - An AcNewDatabaseFormat constant that specifies the file format to use for the newly created database.
Possible values are
acNewDatabaseFormatAccess2000 | Create a database in the Microsoft Access 2000 (.mdb) file format. |
acNewDatabaseFormatAccess2002 | Create a database in the Microsoft Access 2002-2003 (.mdb) file format. |
acNewDatabaseFormatAccess2007 | |
acNewDatabaseFormatUserDefault | Create a database in the default file format. |
Template (String) - The name of the template to be used for the new database.
SiteAddress (String) - Uniform Resource Locator (URL) of the Windows SharePoint Services 3.0 site to link to.
ListID (String) - Globally Unique Identifer (GUID) or the name of the Windows SharePoint Services 3.0 list to link to.