I'm not sure if I understand the question correctly, but if you are trying to make sure some code runs each time the database is closed, you can open a hidden form when the database is open and place the code that you want to run on the 'on unload' event of the hidden form. When the user closes the database, the hidden form will be 'unloaded' and your code will run. Mike Rohde
rohdem@marshallengines.com