Brenda,
You need an ON SHUTDOWN handler to know when the user has clicked the Close button on the app titlebar.
>Programming in VFP 5.0. Have not noticed a need for ON SHUTDOWN, but just ran across it in the help. I control the exiting from my app, I think. What does ON SHUTDOWN do for you?