Can a report be set up so that when a user clicks the "X" to close it, that it does not prompt him to save it. It just closes without being saved?
First I use this command:
DoCmd.OpenReport "rptFlexible", acViewDesign
Then, using VB, I populate a lot of the report based on selection criteria from a form. Then, I issue this command
DoCmd.OpenReport "rptFlexible", acViewPreview
However, when the user clicks the X to close it, they are prompted to save it. I don't want it to prompt them to save it. I just want to close it without saving.
I tried to put code in the Close Event of the report, but the prompt comes up before the code is executed. In the code that opens the preview, I have tried
DoCmd.SetWarnings False
and
DoCmd.Echo False
but it still prompts them. Any ideas?
First I use this command:
DoCmd.OpenReport "rptFlexible", acViewDesign
Then, using VB, I populate a lot of the report based on selection criteria from a form. Then, I issue this command
DoCmd.OpenReport "rptFlexible", acViewPreview
However, when the user clicks the X to close it, they are prompted to save it. I don't want it to prompt them to save it. I just want to close it without saving.
I tried to put code in the Close Event of the report, but the prompt comes up before the code is executed. In the code that opens the preview, I have tried
DoCmd.SetWarnings False
and
DoCmd.Echo False
but it still prompts them. Any ideas?