Restricting Access 97 to only one open application

  • Thread starter Thread starter gobarr
  • Start date Start date
G

gobarr

Guest
I am trying to set up the computers at my work so that the employees can only open one instance of our shared access database on thier PC's. Is there someway to tell Windows, or Access to realize when there is a duplicate database already open? When employees have duplicate applications of access running it causes problems and the computers usually runs out of memory, freeze, or the forms don't work correctly.
 
Restricting each user to one database open

The easiest way would be to add a users table, and, by means of a workgroup file, make users log in. In the autoexec, run a query that adds each user to a 'users logged in' table [in the back-end]. Before that query runs, add another query or run code that verifies if that user is already in the logged in table - if so = automatic quit [with a message, if you like]

You'll also need a query to log out users when the database closes, and I also use a query in the autoexec that removes all 'yesterday's logins', just to keep the table clear.
 
dibby44's solution would work in a utopian world where all users quit the database properly, unfortunatly people like exiting access via the task manager or a cold reset.

I like to use this API code to stop multiple copies of my database from being run:

http://www.mvps.org/access/api/api0041.htm
 

Users who are viewing this thread

Back
Top Bottom