>I am afraid that my end-users will leave my app (by clicking on the 'x' in the top corner) without saving (I am using buffered data).
>
>I want to either:
> 1. disable the 'x'
> 2. find a method where I can check for saved data and query the user. In other words, what is a method that fires just after the 'x' is clicked? The 'unload' method is too late, most of what I need is gone.
>
Randy,
When the user clicks the "X", QueryUnLoad fires. You can prevent it from firing by placing NODEFAULT in that method. What's usually best, is to place code in there that asks them if they want to Save, Revert or Cancel closing the form. Depending on their response, react accordingly. Further, if there's a button on the form to close it, you can call QueryUnload in the Click event, and have QueryUnload return .T. or .F. that can then be used to determine whether or not you call ThisForm.Release.
George
Ubi caritas et amor, deus ibi est