preventing multiple users using a frontend db

R

R.Warning

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
 
A

Aaron Kempf

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
 
E

Ed Metcalfe

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.
 

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