Interrupting DoCmd.Close & Form Unload Event
I have a form with a button to exit Access. It's very basic, i.e. asking if you're sure and then issuing a DoCmd.Quit command. The form then has an UNLOAD event. The unload event has error trapping VBA code to call an error handling subroutine if something goes wrong upon the form unloading.
How to I interrupt the CLOSE and allow Access and the form to stay open when there is an error trapped in the unload event? Right now, the CLOSE command is issued, the UNLOAD even fires, it triggers an error, and Access shuts down anyway.
I've tried a few things but they're not working or I'm misusing them. I'm using Access XP (2002).
Thanks in advance.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division
|