Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force user logout from an access database at a specific time

Status
Not open for further replies.

taiwai94

Programmer
Jul 8, 2005
20
GB
I currently maintain an access database that I have made. At a certain time in the day, I need exclusive access to the database to run some reports. Obviously I can't have exclusive access until all other users have logged out. Is it possible to have something in the database that at a certain time (such as say 8:30am) all users are automatically logged out of the database (I have a specific macro that ensures users properly exit the database). Once users have been given the boot, I would need say a macro to run to prevent users getting back into the database, although this marco would exclude my username so I can get back into the database, run my reports, and once the reports are run, everything goes back to normal and all other users can resume work.

I know how to "lock" the database with macros preventing users for getting straight back in after being booted out, but its the "booted out" part that I need to know how to do in the first place. Can anyone help please?

Regards,

David
 
yes it is.

you need a few things;

a form in the (client?) db that the user is working in that is always open. On this form you have the timer set to check a table that you as an admin have also access to. If you set a certain value (boolean) than the form triggers the application.quit and the user is kicked from the db.

you have to refine this, because it is rather impolite to kick them without warning. Also, you could create a second boolean to check on tha prevents users from opening the DB again.
usually the form that is always open checks when loaded if this boolean is set, and tah kickes the user straight away.

btw, I used to use this a long time ago, but have completely switched to amultisuersystems with proper front-end and back-end. it hardly ever occurs that I need to have exclusive access to the DB. If so, it just means a little overtime...

EasyIT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top