Timer Control

P

Paul

I have a large access database, that links to an Oracle back end, the
database has 50+ users, and I am constantly updating it with new features.

I have created an option in one of the Oracle tables that the front end
checks every time the user performs an action such as opening a form, if the
option is set to -1 then the database front end shows a message box saying
that I am performing an update, and then it closes the database.

My problem is where users have left their PC with the front end open, and
gone into meetings etc.

What I would like to do is add a timer to the main form that checks say
every 2 minutes if my oracle table value is -1 and if it is closes the
database.

I suspect this will be a problem because the main form does not have the
focus for most of the time.


Any suggestions appreciated, and how to use the timer function too as I have
no experience with it.


Thanks


Paul
 
B

Brendan Reynolds

An Access form has a Timer event and a TimerInterval property. You put the
code you want to execute in the Timer event procedure, and set the
TimerInterval to the interval (in milliseconds) at which you want the code
to run. The form does not need to have the focus or be visible, it just
needs to be open.
 
J

Jeff Boyce

Paul

I recall seeing a Time-The-User-Out code snippet in either mvps.org or via
Google.com. If memory serves, it would do what you're asking by:
* setting up a timer in a form that would be guaranteed to be open
(even if not in focus)
* re-setting the timer in the event of any activity
* quitting out if the timer reached its limit

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
P

Paul

Hi Brendan,
I cant find the Timer control in my toolbox, any ideas where I can get it ?

Thanks

Paul
 
B

Brendan Reynolds

It's an event, Paul, it is not a control. Open the form in design view and
look in the Events tab in the Properties window.
 
P

Paul

Thank you all.
In the end I succeeded by stealing some of the code from Brendans example.

But all your replies where most appreciated.

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top