Detecting user IdleTime then check value in table..stuck?!

Franky G

Registered User.
Local time
Today, 20:52
Joined
Feb 6, 2001
Messages
62
Hi,

My DB is split into front and back end, most of the tables are linked
to Oracle database. At the moment, I'm using a hidden form to detect
idletime and close the database after x minutes of idletime - see
http://support.microsoft.com/default.aspx?scid=KB;en-us;128814

I would rather have a table (say, 'tblMaintMode')which indicates that
Access is in 'maintenance mode' or normal mode, simply by using yes/no
or 0/1 value. Then the idletime form would check the value in this
table and shut Access only when it is in Maintenance mode. I'm not
sure how to have Access read this table and respond accordingly.
Here's what runs when idletime is detected;

Sub IdleTimeDetected(ExpiredMinutes)
DoCmd.OpenForm "frmAccessShutdown", acNormal
End Sub

What I'd like to do once Idletime has been detected is;
Check the value in the tblMaintMode, if equals 'yes' then continue
with shutdown, else reset idletime timer.

Any suggestions most welcome, I'm just testing code just now...

Thanks,

FrankyG

ps I Assume I could use the same principle on Startup, check the value
in tblMaintMode, if 'yes' then display message to user and shutdown,
else do nothing? would that work?
 
I'm guessing you'd have an extra linked table with one field, and only one record in it that you would switch between your modes.

If DLookup("Mode", "tblModes") = "Maintenance" Then

bla bla bla
 
Hey, thanks for the quick reply...got it working, at least the first bit. Now to check whether I can change the value in tblMaintMode while other users are in the Database...hmmm. If I can, then Sweeeet :-)

FrankyG
 
You can...as long as another user hasn't got the table open in another frontend.

As you are only checking - the record locking will be almost instantaneous. Of course, a little error routine would catch any record locking and would repeat the check until a value was gleaned.
 

Users who are viewing this thread

Back
Top Bottom