Open an Access Report in Print Preview and Restore the Form
Question details
Open an Access report in Print Preview from an unbound parameter form, then display the form again when the report closes.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A user runs a report from an unbound form that supplies report parameters.
- Observed behavior
- The report may not receive focus when the parameter form is modal, and the form needs to be displayed again after the report closes.
Identify the exact names of the parameter form and report, and check whether the report reads values directly from the form. Open the form and report in Design View so you can edit their properties and events.
Make the form nonmodal and restore it when the report closes
Use this approach when the report needs access to values on the form while it is open.
Open the parameter form in Design View, open its Property Sheet, and set Modal to No on the Other tab. A nonmodal form allows interaction with other database objects.
In the report button's On Click event, select Event Procedure and open the VBA editor. Use the following code, replacing ReportName with your report name: Private Sub CommandButton_Click() On Error GoTo OpenError Me.Visible = False DoCmd.OpenReport "ReportName", acViewPreview Exit Sub OpenError: Me.Visible = True MsgBox Err.Description End Sub Keep the event procedure name Access creates for your button.
Open the report in Design View. In the Property Sheet's Event tab, set On Close to Event Procedure and add this code, replacing ParameterForm with your form name: Private Sub Report_Close() If CurrentProject.AllForms("ParameterForm").IsLoaded Then Forms("ParameterForm").Visible = True Else DoCmd.OpenForm "ParameterForm" End If End Sub
Open the parameter form, enter values, and click the report button. Confirm that the report opens in Print Preview and that closing it displays the form again.

Open the Access report in a separate or dialog window
Use a pop-up report or Dialog window mode when you want the preview to appear in a separate window.
Work with Office Documents Alongside Your Access Reports
WPS Office is a free, lightweight alternative for everyday documents, spreadsheets, and presentations. Its familiar interface and Office format compatibility make it easy to move existing files into your workflow. It does not replace Microsoft Access or fix Access report events.

Frequently Asked Questions
Why does my Access report open behind the form?
A modal form can prevent the report from receiving focus. Open the form in Design View and set Modal to No in the Property Sheet.
How do I open a report directly in Print Preview?
In an OpenReport macro action, set View to Print Preview. In VBA, use DoCmd.OpenReport with the acViewPreview argument.
Can a hidden form still supply values to a report?
Yes. If the form remains loaded, report expressions can refer to its controls even when its Visible property is False.
Why should CloseWindow come before OpenReport in a dialog-mode macro?
OpenReport in Dialog mode pauses subsequent macro actions until the report closes. If the form must close first, put CloseWindow before OpenReport and make sure the report does not need values from the closed form.
Can I reopen the parameter form when the report closes?
Yes. Add an OpenForm action to the report's On Close event. If the form was hidden rather than closed, use an event procedure to set its Visible property to True.




