close db based on inactivity

johnlatona123

Innovator
Local time
Today, 07:09
Joined
Sep 20, 2011
Messages
85
hi all,

i cant even attempt to write this one, so i would like some help if anyone can write this...

heres the idea...

1) i want a FORM based piece of code that closes the form after 5 minutes of inactivity

2) i want to close the database when any pc goes to screen saver

please help me write this, i am totally lost on this one.

thanks!
 
This is not easy to do (or at least, I didn't find an easy way of doing it).

I did implement an inactivity time out on a database based (it didn't include going to screensaver - that's beyond me).

What I did was to have a local table in my database front end which had datetime field. This was updated to the current time every time a user clicked on any button on any form (behind each button I added a line calling my activity code module).

What this did was update the datetime field in the local table to the current date / time.

In addition, I had a form which opened as hidden when the database opened and which had a Timer event set to run every 5 or 10 seconds.

When it ran, it determined the current date / time and subtracted the date / time value in the local table (i.e. the date / time of last activity). If it was more than 60 minutes (in my case), it then executed some code to close the database.

Not brilliant, but it did the job.
 

Users who are viewing this thread

Back
Top Bottom