Universal Close Table

  • Thread starter Thread starter Chuck W
  • Start date Start date
C

Chuck W

Hi,

I have a sales application that has a macro that
refreshes a table every night. There are about 10 people
who are using this access application. I am running into
a problem where the tables are sometimes not getting
refreshed because one or more of the ten users has left
it open. I am looking for a way to either boot everyone
out late at night or at least close the table they are
in. I noticed that there is a close table command in the
macros. But is this for everyone or just myself. I want
to make this universal for everyone.

Thanks,

Chuck
 
Chuck,

You are not very clear on your setup. Is it a multi-user application with a
common back end? What do you mean "refresh"? Are you trying to compact
maybe?
Anyway, there are ways to close the application if the user doesn't, using
some code fired by a timer event on a main form that is always open (or a
hidden dummy form just for the purpose, if you don't have one that is always
open).
One possibility is to check the system clock and close the application if,
say, the time is past midnight.
Another is to define a global variable to hold the time of the last user
action, which you must update everytime the user does something
(entering/changing data on a form, clicking on command buttons etc), and
have the timer event code check the value in the variable vs. current system
time, so it will close the app if the difference between the two exceeds a
predefined value (e.g. 30 minutes). A timer interval of, say, 1 minute
(60000 millisecs in the timer interval property) would do it just fine in
either case.

HTH,
Nikos
 
Back
Top