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

Force close the DB

Status
Not open for further replies.

student4life

Programmer
Jul 14, 2006
12
US

Do you guys know of a code that will force close the application with or without saving?
I have about 15 users and the DB stays open for hours. If I want to do a fix I will have to wait until the users close the application. Any ideas?

Many thanks in advance for your help.
 
If you are doing it from within the mdb,
DoCmd.Quit acSaveYes will work (or omit the acSave argument and don't save changes).....

I have great faith in fools; self-confidence my friends call it.
-Poe
 
Create a table with a single Yes/No field in it.

When you want to kick the users out you set the value to True.

Create a form with no controls and a timer event running every 30 seconds or so. The timer event needs to check the value of the record in the table. When False do nothing, when True run Application.Quit.

The form needs to be opened as part of your database's startup routine. It's best to open it as hidden.


Ed Metcalfe.

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top