This could possibly be a rather tuff one, because, correct me if I'm wrong, it's about what happens when a close of the form is invoked from the "x" thingie in the upper right corner (thougn it can perhaps also be invoked by a custom close button, but that one has some flaws;-))?
Remember the form error event isn't a validating event, there's probably not much you can do there, except substituting select form error messages with your own... I think the form error event, happens after the before update, and the before update is the event where you can cancel a save operation... I think, catching this in the before update event of the form, is probably more likely to provide a path to a working solution?
Though perhaps not entirely according to requirements, have a look at the approach I outlined here thread702-866344 - involving
- disallowing the "x" - thingie
- using the most reliable save method
- trapping what happens in the before update, to determine how to procede
Could any of this fit into your approach?
Roy-Vidar