Opening a Database

To open an existing database, use the OpenDatabase method of a Workspace object. The syntax is:

Set DatabaseVar = [WorkspaceVar.]OpenDatabase _
(DatabaseName[, exclusive[, read-only[, source]]])

where DatabaseName is the name of an existing database. (As indicated by the square brackets, the other parameters are optional.) For information about the optional parameters, see the Access Help system.

It is important to remember to close a database opened through the OpenDatabase method. This removes the database from the Databases collection.

Get Access Database Design and Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.