Fix Access 2007 Closing Immediately When Opening a Database
Question details
The user needs Access 2007 to open a database normally without relying on the /decompile switch.

- Product
- Microsoft Access 2007
- Device & OS
- not provided
- Scenario
- Opening an Access database after a new Office installation.
- Observed behavior
- Access closes immediately when the database opens, while using /decompile temporarily bypasses the problem.
Check whether Access closes for every database or only one, and identify the installed Office 2007 service pack. If the database contains VBA code, make sure you can open a working copy for the compile and import checks.
Install Office 2007 Service Pack 3 and Repair Office
Use this first when Access is installed on a new computer or Office 2007 may not be fully updated. Installing Service Pack 3 resolved the reported case.
Open Access without the database, click the Microsoft Office Button, and select Access Options > Resources > About to check the installed version and service pack.
If Service Pack 3 is missing, obtain the applicable Office 2007 Service Pack 3 installer from Microsoft if it is available, and run the installer. Follow any restart prompt.
If Access still closes, open Control Panel > Programs and Features, select Microsoft Office 2007, click Change, and choose Repair.
Open the database normally without /decompile and check whether Access remains open.

Compact, Import, and Compile the Access Database
Use these checks if the problem persists after updating and repairing Office, especially when only one database is affected.
Use WPS Office for Everyday Office Documents
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing common Office documents. Its format compatibility makes it easy to move everyday files between office suites. It does not repair or replace Microsoft Access databases.

Frequently Asked Questions
Why does Access 2007 work only when I use /decompile?
The switch can temporarily bypass a problem associated with compiled database data, but it does not establish the cause. Check the Office service pack, repair Office, and test the database without the switch.
Did Service Pack 3 fix the reported Access crash?
Yes. In the reported case, Office 2007 had not been updated on a new installation, and installing Service Pack 3 resolved the immediate closing.
How can I tell whether the database or Access installation is the problem?
Start Access without opening the affected file, then use the Microsoft Office Button > Open to test it. Also try another database. If only one file causes the closure, compacting it or importing its objects into a blank database may help.
Where do I check trusted locations in Access 2007?
Open Access Options > Trust Center > Trust Center Settings > Trusted Locations. Only add a folder if you trust the databases and other files stored there.
Can WPS Office open and repair my Access database?
No. WPS Office is an alternative for common documents, spreadsheets, and presentations, but it does not repair or replace Microsoft Access databases.




