vba to allow one user access of .mdb

  • Thread starter Thread starter ll
  • Start date Start date
L

ll

I am working with a project form in MSAccess and was wondering if
there is a way to limit access to one user at a time? I have already
set the access to 'exclusive' in Options>Advanced, but multiple users
can still access it at the same time. Would the use of
'isalreadyopen' be of assistance in this?
If I went the route of adding the "/excl" switch in the shortcut,
would that be the shortcut you make from Access, as opposed to a
desktop shortcut?

Many thanks for your help in this,
Louis
 
Susan's comment is correct!

Anyways,
You can make the db open in exclusive mode. this only allows a single user
at a time.

Another alternative would be to check the currentusers at the opening of
your db and if there is already a user, boot off whoever else is trying to
access it at that time. some info to get you started can be found at
http://www.mvps.org/access/general/gen0034.htm
 
Not to belabor the point, but this is very unusual and highly suspect. It
appears you have one mdb in a shared folder to which multiple users have
access. This is your first mistake.

You should always have your application split, front end an back end. If
this is an unfamiliar concept, do some searching on MSDN.com.
 
Klatuu said:
Not to belabor the point, but this is very unusual
and highly suspect. It appears you have one mdb
in a shared folder to which multiple users have
access. This is your first mistake.
You should always have your application split,
front end an back end. If this is an unfamiliar
concept, do some searching on MSDN.com.

Could be that each user has their own copy of the FE, so each can access the
application independently, too. If it is a split FE, with each user having
their own copy, you'd have to block more than one user accessing the Back
End at the same time.

I've never faced a need to do that kind of control on a DB.

Larry Linson
Microsoft Access MVP
 
Back
Top