Fix Microsoft Access Freezing When Opening a Report from a Hidden Window
Question details
The user needs to diagnose why an Access report freezes when opened after the application window is hidden.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A startup login form uses VBA and ShowWindowAsync to hide the Access application window before opening a report.
- Observed behavior
- The report opens normally when the Access window remains visible, but Access may freeze when the window is hidden.
Locate the startup form code that calls ShowWindowAsync and identify the report and its underlying query. Open the database in Access and make sure you can access the VBA editor and report design.
Compile VBA and trace the report opening process
Use these checks to distinguish a VBA or query issue from behavior associated with hiding the Access window.
Press Alt+F11 to open the VBA editor, then select Debug > Compile. Correct any errors reported and compile again.
In the VBA editor, add Option Explicit at the top of each module, before any procedures. Select Debug > Compile again and declare any variables flagged by the compiler.
In Access, open the report in Design View and check its Record Source in the Property Sheet. Open the underlying query independently from the Navigation Pane and check whether it runs promptly.
In the report's Property Sheet, select the Event tab and open the On Open event procedure. In the VBA editor, click the margin beside its first executable line to set a breakpoint, then open the report and check whether execution reaches it.
Temporarily bypass the ShowWindowAsync call in the startup form and open the report with Access visible. Compare the result with the hidden-window test to isolate the window-hiding call as a possible cause.

Use WPS Office for Everyday Documents and Spreadsheets
WPS Office is a free, lightweight alternative for working with familiar Office document formats in an easy-to-use interface. Its format compatibility helps with moving everyday files from Microsoft Office. It does not fix Access freezing or run Access database reports and VBA.

Frequently Asked Questions
Why does the report open when Access is visible but freeze when it is hidden?
The difference points to the window-hiding logic as a possible cause, but it does not establish the exact fault. Bypass the ShowWindowAsync call and compare the report's behavior in both states; also check for prompts that may need user interaction.
How do I check whether the report's Open event runs?
Open the report in Design View, select the Event tab in the Property Sheet, and open the On Open event procedure. Set a breakpoint beside its first executable line in the VBA editor, then open the report.
How can I tell whether the report query is slow?
Check the report's Record Source in the Design View Property Sheet, then open the underlying query independently from the Navigation Pane and observe how long it takes to run.
Can WPS Office run my Access report?
No. WPS Office does not run Microsoft Access database reports or Access VBA. You can use WPS Spreadsheets to work with report data exported to a supported spreadsheet format.




