set access file to open in exclusive mode

L

ll

I am working with a project form in access currently, and I would like
for the users to be able to work with the form, but only one user at a
time. I currently have a switchboard that opens by default when
the .mdb file is double-clicked.
I've set the access (in options/advanced) to 'exclusive' and I
unchecked the box under the locking options (I set locking options to
'all records'). Is there a way to display a message to the user (if
someone else is working in the file) that they cannot have access at
that time, etc?
Thanks for your help,
Louis
 
L

Larry Daugherty

Any time a user attempts to open an Access application that someone
already has opened exclusively they'll get a message from Access to
that effect.

It sounds like poor design and/or poor deployment.

Each user should have a copy of the FE on their PC. The BE should be
on a server. That way, each user always is the only one in their copy
of the FE.

HTH
 
L

ll

Is there a way to only allow access to the form (if not the database)
to one user at a time? Could this be added to the VBA of the form?
Thanks
 
R

Rick Brandt

ll said:
I am working with a project form in access currently, and I would like
for the users to be able to work with the form, but only one user at a
time. [snip]

Why?
 
L

ll

Allow me to further specify - to prevent duplicate project idnumbers.
When two users are in the application at the same time, the form is
populated by the same 'new' record number, which is then used as the
project id number. Forcing only one user on at a time would help to
eliminate that.
 
D

Douglas J. Steele

Coming up with a proper approach to assigning the new record number would
help eliminate it too.
 
R

Rick Brandt

ll said:
Allow me to further specify - to prevent duplicate project idnumbers.
When two users are in the application at the same time, the form is
populated by the same 'new' record number, which is then used as the
project id number. Forcing only one user on at a time would help to
eliminate that.

That just means that your method for assigning the number is flawed. How are
you doing it?
 
L

ll

That just means that your method for assigning the number is flawed. How are
you doing it?


The user opens a form which populates a box with the record number
current at the time of the form's opening. The obvious problem with
this is that multiple users can have the same number on their forms at
the same time. The box/field is bound to a column in the table. Thus
the problem with duplication in that column of the table. Please see
code below:

Private Sub Form_Current()
txtProjID = Me.CurrentRecord
End Sub
 

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