I have the following code in a form that opens a report in a design, then preview mode
The report previews OK
If I click the top right X the report closes and returns to the form, this is good
If I press Esc Key while in report preview the report closes and goes to report design mode, this is not good
Using the following what can I change so if I press Esc Key in preview mode the report closes and returns to the form just like clicking the X?
Thanks, John
DoCmd.OpenReport "rpt_ObjectMigrationWorksheet", acViewPreview Set rpt = Reports!rpt_ObjectMigrationWorksheet rpt!txtTitle = "List of Object Candidates for Migration" rpt!txtSubTitle = "(Included Dates: " & Me!txtStartDate & " to " & Me!txtEndDate & ")" DoCmd.OpenReport "rpt_ObjectMigrationWorksheet", acViewDesign DoCmd.OpenReport "rpt_ObjectMigrationWorksheet", acViewPreview