CAUTION: If you follow the steps in this example, you modify the sample
database Northwind.mdb. You may want to back up the Northwind.mdb file and
follow these steps on a copy of the database.
Steps to Reproduce Behavior
This issue can occur in the following scenarios.
Scenario 1
After you compact a database, the printer settings for reports
that contain subreports are reset to their default values after the second time
that you preview a report.
To reproduce the first scenario, follow
these steps:
- Start Access 2000 and open the sample database
Northwind.mdb.
- On the Tools menu, click Options.
- On the General tab, make sure that the Perform name AutoCorrect
check box is selected. If not, click to select it, and then restart Access.
- Open the "Sales by Category" report in Design view.
- On the File menu, click Page Setup.
- Change all margins to .25".
- Click the Page tab.
- Under Orientation, verify that the orientation is set to Landscape.
- Save and close the report.
- Preview the report to verify that Access saved the margins
and orientation correctly.
- Close the report.
- On the Tools menu, point to Database Utilities, and then
click Compact and Repair database.
- Preview the "Sales by Category" report. Note that the
settings still look correct.
- Close the report, and then preview the report again.
Note that the report layout has changed. When you click Page
Setup on the File menu, note that the printer settings have been reset to their
default values in the Page Setup dialog box. The margins are set at 1", and orientation is set to Portrait.
Scenario 2
After you modify the design of a table or query (not the names of
any tables or fields) being used for the record source of a report, the printer
settings for the report are reset to their default values after the second time
that you preview the report.
To reproduce the second scenario,
follow these steps:
- Start Access 2000 and open the sample database
Northwind.mdb.
- On the Tools menu, click Options.
- On the General tab, make sure that the Perform name AutoCorrect
check box is selected. If not, click to select it, and then restart Access.
- Create a new report based on the Customers table.
- Add the CustomerID field to the report.
- On the File menu, click Page Setup.
- Change all margins to .25".
- Click the Page tab.
- Under Orientation, verify that the orientation is set to Landscape.
- Close and save the report as testCustomers.
- Preview the report to ensure that it is formatted
correctly.
- Close the report.
- Open the Customers table in Design view.
- Add some extra words to the Description property of the CustomerID field.
- Save and close the table.
- Preview the testCustomers report. Note that the settings
still look correct.
- Close the report, and then preview the report again.
Note that the report layout has changed. When you click Page
Setup on the File menu, note that the printer settings have been reset to their
default values in the Page Setup dialog box. The margins are now set at 1", and orientation is set to Portrait.
Scenario 3
With Name Auto Correct on:
- Create a report based on a query.
- Set the Margins to .25 from the default of 1.
- Save the report.
- Rename the query.
- Compact the database.
- Reopen the report in print preview. Check the margins, and
note that they have returned to 1 from .25.