preventing multiple users using a frontend db

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

In my front end access 2003 application I need to prevent that multiple
users are opening this file at the same time. is there a way to do this?

regards

Rob
 
SQL Server has a simple 'single user mode'

if you used Access Data Projects-- like it is reccomended-- then you would
have a very very simple solution to your problem
 
R.Warning said:
Hi,

In my front end access 2003 application I need to prevent that multiple
users are opening this file at the same time. is there a way to do this?

regards

Rob

1. Add a table to the frontend containing a single "UserID" field.

2. Add a hidden form to your database that is opened as part of your startup
routine.

3. Add an On_Open event to the form to add a record to the table.

4. Add an On_Close event to remove the record on form close (this will
happen when the user exits the database).

5. Add code to your startup routine to check the recordcount of the table.
If the recordcount >0 then Application.Quit.

Ed Metcalfe.
 
Back
Top