I have created a hidden form that opens with an autoexec macro when I open my database. It does some startup routines that run fine. However, I also need to do some clean up on shutdown so I have hooked some code on the 'On Close' event of the hidden form. When I exit Access 2007 SP2 from the application X, or call doCmd.quit, the form 'On Close' never fires. I have tried creating a new stripped down database with only a autoexec and the startup form, still with no luck. I even went so far as to leave the form visible when it opens. When I manually close the form, it fires. If I close Access, it does not fire. Can anyone help here? I feel like this should be simple?