Fix a Password Prompt When Closing a Microsoft Access Database
Question details
The user needs to stop an unexpected password prompt when closing a Microsoft Access database.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- The user closes an Access database and is asked for a password.
- Observed behavior
- A password prompt appears as the database closes and may be related to Compact on Close or an issue with the database file.
Open the affected database and check whether Compact on Close is enabled. Before repairing or rebuilding the file, make a copy of the database and ensure other users have closed it.
Turn off Compact on Close in Microsoft Access
Use this first if the password prompt appeared after Compact on Close was enabled.
With the affected database open, select File > Options.
Select Current Database, clear the Compact on Close check box, and click OK.
Close and reopen the database, then close it again to see whether the password prompt has stopped.

Import objects into a new Access database and repair it
Try rebuilding the database if the prompt continues after Compact on Close is disabled.
Work with exported Access data in WPS Spreadsheets
WPS Office is a free, lightweight Office alternative with a familiar interface. Export suitable Access tables or queries to Excel to move tabular data into WPS Spreadsheets. WPS does not repair Access databases or replace Access forms, relationships, and macros.

Frequently Asked Questions
Where is Compact on Close in Access?
Open the affected database and select File > Options > Current Database. Look for the Compact on Close check box.
Why does disabling Compact on Close stop the password prompt?
If the prompt is triggered by the automatic compact operation, clearing Compact on Close prevents that operation when the database closes. The underlying cause may depend on the database file or its configuration.
Will turning off Compact on Close remove my database password?
No. The setting controls automatic compacting; it does not remove encryption or a password from the database.
How do I move Access data into WPS Spreadsheets?
In Access, select a table or query and use External Data > Excel to export it. Then open the exported Excel file in WPS Spreadsheets. Database forms, relationships, and macros are not transferred as spreadsheet features.




