CreateDatabase Method (MDB)

CreateDatabase Method (MDB)

The CreateDatabase method in the DAO object library creates a new Access database (.mdb) database from Visual Basic, opens the new database, appends it to the Databases collection, and saves to disk.

Use of the CreateDatabase command doesn't affect the database that's currently open in the Microsoft Access Database window. A database that you've opened in the Database window remains open and is the first database in the Databases collection.

To open a database that you have created with CreateDatabase in the Database window, you must click Open Database on the File menu.