Others

Open an Access Report in Print Preview and Restore the Form

John WilsonJohn Wilson Nov 25, 2026 869 views

Question details

Open an Access report in Print Preview from an unbound parameter form, then display the form again when the report closes.

Open an Access Report in Print Preview and Restore the Form
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.
Before you start

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.

Solution 1Recommended

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.

1
Change the form's Modal property

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.

2
Hide the form and open the report

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.

3
Restore the form on report close

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

4
Test the sequence

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.

Make the form nonmodal and restore it when the report closes
Keep parameter values available: Hiding the form leaves it loaded, so report expressions that refer to its controls can still read their values.
Free Microsoft Office alternative

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.

Review report data in WPS Spreadsheets after exporting it from AccessOpen and edit common Microsoft Office formats, including DOCX, XLSX, and PPTXUse familiar document, spreadsheet, and presentation toolsGet started with a free, lightweight office suite
microsoft office alternative - wps office

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.