Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close box/menu Exit 1

Status
Not open for further replies.

jopaumier

Programmer
Mar 15, 2002
97
US
When my program starts, an mdi opens with a single form shown. The program gathers a little information from the user (including the Access database containing the data the program runs against) on this and one subsequent form, then runs and performs an extensive QA of the data, writing messages to tables that are ultimately used to generate on-screen reports. Once the data are Qa'd, a message box pops up asking the user if he/she wants to view the reports of potential data problems. Answering Yes displays the reports (using a dataenvironment, before I knew better), one on top of the other (they are all maximized) until all the reports are displayed. The user then closes each one in succession and is returned to the intial form in the mdi.

The mdi has a single menu item - Exit, the only code is to unload forms. If the user clicks on Exit, the program shuts down and is not shown in the task manager. However, if the user clicks on the Close box (upper right corner), the app goes away, but the task manager shows that it is still running.

What event is triggered by clicking on the close box of the mdi? Why the different behaviors? From some other threads here, it seems I may have left something open (there are no timers, just forms, database and recordset connections, and the dataenvironment). But I seem to run out of ideas on my own.

Jim
 

Use the Query_Unload event to shut down your program.

Good Luck

 
vb5

Thank you so very much for the suggestion. It works! Once I get my MSDN CD back in the office I can read up on that event. Have a star.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top