Thanks for the pointer. I've got it working properly now.
>Yes, you can trap this situation, but in QueryUnload event. If you want to cancel form unload, set Cancel parameter of this event to True (or something different from 0). In addition, you can use UnloadMode parameter to determine which cause form unloading - clicking of 'X', issuing Unload command from code, etc. Check MSDN article "QueryUnload Event" for further information.
Al Williams
Anola MB, CANADA