File Corruption & Recovery

Fix a Password Prompt When Closing a Microsoft Access Database

Kushani NimanthikaKushani Nimanthika Nov 20, 2026 869 views

Question details

The user needs to stop an unexpected password prompt when closing a Microsoft Access database.

Fix a 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.
Before you start

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.

Solution 1Recommended

Turn off Compact on Close in Microsoft Access

Use this first if the password prompt appeared after Compact on Close was enabled.

1
Open database options

With the affected database open, select File > Options.

2
Disable automatic compacting

Select Current Database, clear the Compact on Close check box, and click OK.

3
Test the database

Close and reopen the database, then close it again to see whether the password prompt has stopped.

Turn off Compact on Close in Microsoft Access
What this changes: Turning off Compact on Close stops automatic compacting when this database closes. It does not remove a password from an encrypted database.
Free Microsoft Office alternative

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.

Review and edit exported database tables in a spreadsheetOpen and save Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface for a smoother transitionWork with a free, lightweight Office suite
microsoft office alternative - wps office

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.