DoCmd.CloseDatabase Method

Access Developer Reference

Closes the current database.

Version Information
 Version Added:  Access 2007

Syntax

expression.CloseDatabase

expression   A variable that represents a DoCmd object.

Remarks

This method has the same effect as clicking the Microsoft Office Button Button image and then clicking Close Database. If you have any unsaved objects when you use the CloseDatabase method, the dialog boxes that appear are the same as those displayed when you click Close Database.