Multiple users in same record - getting an error

R

RitchieJHicks

Hi,

If I have more than one user in a record and they both try to amend it, I
get a debug error. What's the easiest way to stop them both accessing the
record at the same time and give a message telling them why?
 
S

scubadiver

Why would they be trying to look at the same record at the same time? That
doesn't sound like good work practice to me.

As far as I am aware there is no way to tell a user that a record is already
being amended by another.
 
S

Stockwell43

Hi Ritchie,

If I'm not mistaken, I believe access will alert the second user that
someone is already in the record and will ask if you want to proceed anyway.
I want to say I had a user ask me about it when she got the message and it
was because someone else was making edits as well.
 
K

Ken Sheridan

There are two locking strategies relating to the editing of records,
optimistic locking and pessimistic locking. The former (No locks) allows two
users to edit a record concurrently. The first user to save the record can
do so normally, but other users get a message when they try to save the
record, allowing them to refresh the record with the other user's changes or
to replace the record with their own edits. I imagine that this is the
message toy are referring to.

Pessimistic locking (Edited Record) locks a record as soon as a user starts
to edit it, so other users can't make any changes until the first user saves
the changes and releases the lock. This is the option you should use. The
record selector changes to a Ø (slashed O) icon to alert the user. No
trappable error is generated, so you can't otherwise inform the user; its
important to leave the form's RecordSelector property as True therefore.
Change the form's RecordLocks property to 'Edited Record'. You'll see that
there is also an 'All Records' option, but that's not relevant to your
situation.

Ken Sheridan
Stafford, England
 
S

scubadiver

Learn something everyday

Ken Sheridan said:
There are two locking strategies relating to the editing of records,
optimistic locking and pessimistic locking. The former (No locks) allows two
users to edit a record concurrently. The first user to save the record can
do so normally, but other users get a message when they try to save the
record, allowing them to refresh the record with the other user's changes or
to replace the record with their own edits. I imagine that this is the
message toy are referring to.

Pessimistic locking (Edited Record) locks a record as soon as a user starts
to edit it, so other users can't make any changes until the first user saves
the changes and releases the lock. This is the option you should use. The
record selector changes to a Ø (slashed O) icon to alert the user. No
trappable error is generated, so you can't otherwise inform the user; its
important to leave the form's RecordSelector property as True therefore.
Change the form's RecordLocks property to 'Edited Record'. You'll see that
there is also an 'All Records' option, but that's not relevant to your
situation.

Ken Sheridan
Stafford, England
 
R

RitchieJHicks

Hi,

On this subject, is there a way to completely lock-out a user if the record
is being read by another?
 

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