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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exit

Status
Not open for further replies.

EscapeUK

Programmer
Jul 7, 2000
438
GB
I what code do i put behind my command button that will allow the user to exit access when they click on it

Thanks
 
Simply,

Application.Quit

However, you should make sure that you have closed all objects and released all references before you do this. Check out Quit Method in the Help files.
 
kathryn,

? what's with the 'close all ... before"?

Ms. Access appears to do a good job of removing object references when closing. What 'She' misses, is cleaned up by the O.S. - which is S L O O W L Y getting better even at that.

What do you know about this that I don't?

MichaelRed
There is never time to do it right but there is always time to do it over
 
I have gotten burned a few times by leaving open references to other applications, such as Word and Excel. It's just good coding practice to set all objects to Nothing when you are done with them. I'm not techie enough to know the reasons why.

Did the Application.Quit do what you wanted?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top