Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / August 2008

Tip: Looking for answers? Try searching our database.

If main form is closed, also quit the application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Song - 09 Aug 2008 05:51 GMT
I use Access 2007 default tabbed window. If use right click my main form tab
and select close, I also want to quit the application to prevent other
forms/report still open without main form. (some reports refer controls on
the main form). What's the event to quit? I tried on close and on unload the
form event, I could not quit (action not available when form is closed or
unloaded).
boblarson - 09 Aug 2008 08:16 GMT
Put this into a new standard module named modClose:

Public Function CloseProgram()
  Application.Quit
End Function

And then in the form's Unload event, call

CloseProgram
Signature

Bob Larson

Free Tutorials and Samples at http://www.btabdevelopment.com

__________________________________

> I use Access 2007 default tabbed window. If use right click my main form tab
> and select close, I also want to quit the application to prevent other
> forms/report still open without main form. (some reports refer controls on
> the main form). What's the event to quit? I tried on close and on unload the
> form event, I could not quit (action not available when form is closed or
> unloaded).
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.