Unanswered: Form_Load Event called on Application quit
I am having problems when I exit my application.
I have a form that opens when a menu item is clicked. In this form's Load Event, I have DoCmd that "pops up" another form, for filtering the selection. This pop up form is also modal.
Now, once I have made the selection in the pop up form, my pop up closes.
Finally, when I still leave the first form open, and exit the application by hitting the "x", the Form_Load event is getting called again. This pops up the selection form which is modal!
Now, since the application is terminating, it does not let me pick anything or close out of the pop up form, leaving Access running, but unfrozen. Its like a splash screen that won't go away. The only option is to End Task through Task Manager, even though the application does not say "Not Responding"
I hope this makes sense. Please let me know if anyone has a solution to this, or has come across this problem.
I do not get this problem in Acces 2002 or 2003. This happens only in 2007 and 2010.
Thanks for the reply. I have a work around, but I was curious as to why this was happening in the new versions.
I have an application quit button also, but it causes the same issue as the "x" does.
I would rather avoid the work around, as I would have to change code in about 30 forms that have the same issue.
I have seen this happen in versions Access 97 to 20010.
On newer PCs with Access 2007/2010 the execution speed is so much faster that there appears to be timing issues. I have seen where events are not used properly, they still working on older versions prior to 2007.
I have found that it is very important to close all modal and hidden forms before attempting to exit Access. I saw this issue even with the Access 97 in runtime mode.
I use a little VBA code that in my main menu/switchboard the prevents Access from closing unless the "Exit" button has been clicked. The "Exit" button also closes all other open forms before closing and quitting Access.
This seams to have solved the issue in all versions of Access.