Quote Originally Posted by DaWolf
How do you get the instance to release properly when the X is clicked?
There are number of thing to look upon closing your app the following "list" is just an idea:

- close all global connections, recordsets, etc (if any)
- destroy all global objects
- close all documents (if automation is in place)
- loop through forms collection and close each form individually
- for each form (form_unload or queryunload events can be used)
... - close any open local connection, etc...
... - destroy all form level objects

... and so on and so forth ...