Inactivity shut-down

  • Thread starter Thread starter rWaag
  • Start date Start date
R

rWaag

I would like to close forms or possibly the entire application when there is
no activity. My users aren't listening to my pleas and it makes overnight
upgrades difficult.

There must be some way to check for inactivity and start closing forms and
backing out of the system but I have yet to find it....Any Ideas?

Thanks
Rich
 
rWaag said:
I would like to close forms or possibly the entire application when there is
no activity. My users aren't listening to my pleas and it makes overnight
upgrades difficult.

There must be some way to check for inactivity and start closing forms and
backing out of the system but I have yet to find it....Any Ideas?

Thanks
Rich

You could have a network admin send a shut down message to all users
machines that access database.

Its a though, i dont know your network setup or if you have other apps
that must stay running all night.

Tyson
 
Hi Rich,

I don't have any experience with this task, buts see if these links help.
Watch out for any possible line wrapping on these links!

http://www.datastrat.com/Download2.html
Look for KickEmOff2K sample database.

http://www.rogersaccesslibrary.com/download2k.asp?SampleName='LogUsersOff2k.
mdb'

http://www.rogersaccesslibrary.com/download2k.asp?SampleName='LogUsersOffNon
Use2k.mdb'

http://support.microsoft.com/default.aspx?scid=kb;en-us;198755&Product=acc

http://support.microsoft.com/default.aspx?scid=kb;en-us;285822&Product=acc

Hope that helps,
Jeff Conrad
Bend, Oregon
 
Hallo,

Got some example code for you that close the app after a period of time
(that you can set yourself). Sent me an email at mailto:[email protected]
and i will sent it to you.

Regards,
Harmannus
 
rWaag said:
I would like to close forms or possibly the entire application when there is
no activity. My users aren't listening to my pleas and it makes overnight
upgrades difficult.

There must be some way to check for inactivity and start closing forms and
backing out of the system but I have yet to find it....Any Ideas?

I have never done this but I do have an idea of direction.

I think the general idea is to have a (possibly hidden) form open at
startup, with a Timer event. When there has been no activity since last
Timer, issue a Quit (extra handling for open/edited objects, as they
will cause a popup and halt the quit).

How will you determine inactivity? That seems difficult to me.
You could display a message (not msgbox but a form with a timeout) that
will last, say, two minutes, and if not confirmed (as a sign that there
is a user) issue the quit.
 
Hallo,

That is indead the idea.

The code is to long and exits of multiple parts. Putting it here would be
rather complex....

Regards,

Harmannus
 
Harmannus said:
Hallo,

That is indead the idea.

The code is to long and exits of multiple parts. Putting it here would be
rather complex....

I see. Do you have a website where to put such examples? I often omit my
code details from posts, but go to some length creating articles and
samples on my site.
 
I sounds to me like you do not need to test for a period of inactivity, only
to have the app shut down from some start time to some end time each night
so you can do maintenance.

I have an Access 97 app that gets updated every night. I have a Menu form
that is the start up form for the app and is open while the app is running.
You could use a single purpose "Hidden" form if you do not already have a
form that is open for the entire life of the application. In the OnTimer
event of this form I have the following code.

' Kill App if running between Midnight and 5 AM
If Time > CDate("12:00:00 am") And Time < CDate("05:00:00 am") Then
DoCmd.Quit
End If

The timer even fires once every 5 minutes. So as long as the user's clock
is not way out of whack I can be reasonably sure that by 2:30 every morning
that my update routine would have unfettered access to the database. This
has been working reliably for years.

Ron W
 
Back
Top