tags:

views:

26

answers:

0

When I close my mdb the Form_Load event for my MasterMenu form (which is open at the time of application shutdown) is being triggered. This causes unwanted processing to happen. Once the processing begins, I cannot interrupt the process to debug.

I tried stepping through the code by typing F8 on the line: Application.Quit, but it executed the Form_Load code without stepping through it.

FURTHER DETAILS:
There is an unbound combo box that has code in its AfterUpdate event that causes the processing to happen (inside Form_Load there is a call to DataLoc_AfterUpdate [DataLoc is the name of the combo box]). I've added a MsgBox right before the Application.Quit line and again inside the DataLoc_AfterUpdate event and somehow the value of the unbound combo box is being changed when the program exits.

EDIT: I found a workaround to prevent the extra processing that occurred as a result of the Form_Load event being run on program exit. In the course of my troubleshooting, I also discovered that the unbound combo box was not having its value changed.

I am still curious to know why the Form_Load event would be running when the program is shutting down.