| Chat with a LIVE Microsoft
Access Expert! |
||||
|
||||
|
#1
|
|||
|
|||
|
Hello Code Hungry Vultures!
This is a database demo complete with source. It illustrates how to force a shutdown or automatically shutdown from inactivity for a specified number of minutes. This allows forcing users out for emergency maintenance such as compacting & repairing because of partial corruption or whatever, and inactivity shutdown for those who loiter in the database when off hours scheduled maintenance is needed such as compacting & repairing, or updates to tables, etc. It is a front end database with a linked back end database. On first opening Shutdown.mdb use the shift key to prevent the Autoexec macro from executing. Then refresh the link for table MsgCenter in BACK_END.mdb. The fields in the MsgCenter table: ShowMsg----------Yes/No---Set this to True/Yes to force shutdown MSG--------------Text-----Message to display in ShutdownMsg form MsgBxTitlBar-----Text-----Titlebar caption to display in ShutdownMsg form MaxInactiveTime--Integer--Max Inactivity Minutes StartMonitor-----Integer--Time of day to start monitoring inactivity - 0 (12AM) to 24 (12PM) EndMonitor-------Integer--Time of day to end monitoring inactivity - 0 (12AM) to 24 (12PM) After link is refreshed either exit Shutdown.mdb and open again to run the autoexec macro or just run the autoexec macro without exiting. Then open the MsgCenter table & click ShowMsg & close the table. Forced shutdown will occur immediately. For inactivity shutdown: Open the MsgCenter table. Change StartMonitor to an hour earlier than the current time. Change EndMonitor to an hour later than the current time. Set MaxInactiveTime to 1 (1 minute) and close the table. Inactivity shutdown will occur in 1 minute. OpnSeason ![]() Last edited by OpnSeason; 03-20-2006 at 01:55 AM.. Reason: Revision |
| Sponsored Links |
|
#2
|
|||
|
|||
|
Thank you for your post, however we have some 10 different posts on this subject
|
|
#3
|
|||
|
|||
|
Thanks for your post OpnSeason!!!
Such is a very useful tool. The code works on my db, except that.... (forgive my ignorance for i am an access novice) i don't know why the inactivity shutdown occurs immediately as soon as i open the form. I did exactly what you've stated on your post: I open the MsgCenter table. I changed StartMonitor to an hour earlier than the current time. I change EndMonitor to an hour later than the current time. Then, i set the MaxInactiveTime to 2minutes and close the table. But, the countdown starts immediately at 20sec. Where did i go wrong? :-( Sheila |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remote shutdown of a shared DB... | bikeman77 | Modules & VBA | 21 | 06-18-2007 01:27 PM |
| Quit Access and shutdown | JackS123 | Modules & VBA | 3 | 11-13-2005 11:35 AM |
| Remote ShutDown | skea | General | 10 | 06-10-2005 06:55 AM |
| Forced Requery to execute first | le888 | Forms | 8 | 02-16-2004 05:09 AM |
| Way to Turn Off Computer Programically After Shutdown? | llyal | Modules & VBA | 2 | 09-25-2001 08:37 AM |