Closing the App - Can it be done? 
Author Message
 Closing the App - Can it be done?

I am using VB 4.0 Pro and NT3.51

After using the Data Form Designer I realize my app will not "close"
when you select "close" on the form.  In any event the code that is
automatically placed there is:  Unload Me.  This seems logical but does
not allow this to happen and consequently keeps running.  The only way
to "Exit" is to put End for the code.  The only problem with this is
that it kicks me out of the application entirely when I just want to
close the database form!  Any thoughts, comments, answers or questions
would greatly be appreciated.

James E. Strouse
Statistician





Sun, 30 Apr 2000 03:00:00 GMT  
 Closing the App - Can it be done?

James,
        Typically when an app doesn't close without the "End" statement is means
there are persistant object references that remain after your code is
finished. The easiest method is to set any objects such as forms or
recordsets = Nothing when you are done using the object variable. In
general any variable you use a Set or New keyword with will need to be set
to nothing in order to release. Object cleanup and termination is typically
one of the first things I put together before my objects actually do
anything since it can be troublesome to find an open object reference that
causes an object not to terminate properly. Hope this helps.

Oscar Bowyer



Quote:
> I am using VB 4.0 Pro and NT3.51

> After using the Data Form Designer I realize my app will not "close"
> when you select "close" on the form.  In any event the code that is
> automatically placed there is:  Unload Me.  This seems logical but does
> not allow this to happen and consequently keeps running.  The only way
> to "Exit" is to put End for the code.  The only problem with this is
> that it kicks me out of the application entirely when I just want to
> close the database form!  Any thoughts, comments, answers or questions
> would greatly be appreciated.

> James E. Strouse
> Statistician






Mon, 01 May 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How To? Closing Shelled DOS app when done

2. VB closing app vs. Windows closing app

3. Recordset: What am I doing wrong?

4. What am I doing wrong??

5. What am I doing wrong?

6. Help with syntax. What am I doing wrong

7. What am I doing wrong?

8. What am I doing wrong?

9. What am I doing wrong?

10. Please tell me what I am doing wrong - DAO parameter Append Query :(

11. Can this be done or am I dreaming?

12. Am I doing the OpenRecordset command correctly?

 

 
Powered by phpBB® Forum Software