Access 2003: How do I close a dynamic report without saving and w.

A

atkinkl

I am creating dynamic cross tab reports and displaying them in acPreview.
When the user closes the report, I want it to close and not save the design
changes. I would like to do this without a save prompt to the user.

I tried using the On Deactivate and On Close events, however the prompt
appears before these lines are accessed in VBA>
 
M

M.L. Sco Scofield

I'm not of aware of any way to suspend the message if you are closing the
report with the close button.

If you can set up a way to disable the close button and force the user to
close the report with a button a form, you can use:

DoCmd.Close acReport, "rptYourReportName", acSaveNo

(The default name for an unsaved report is typically Report1.)

Good luck.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Denver Area Access Users Group Vice President www.DAAUG.org
MS Colorado Events Administrator www.MSColoradoEvents.com
Useful Metric Conversion #18 of 19: 8 nickels = 2 paradigms (My personal
favorite)
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 
Top