Vineet Dutt said:
Does Access employ locks on records and not allow any other updates whilst
an update is being made to a record?
Yes, record locking and multi user is built in to ms-access. You do NOT need
to do anything more.
The default setting (used for all forms that you make) can be found in:
tools->options - Advanced tab -
The 3 options are:
NO LOCKS
ALL RECORDS
EDITED RECORD.
Note that the setting in the tools options does NOT change existing forms,
but ONLY sets the default for new forms. So, locking is actually set on a
form by form bases.
lets go through the above 3.
NO LOCKS
This is the default. Note that if while you are editing the record,
another user comes along, and also edits the SAME record, then who ever
saves first wins!!! The 2nd user is presented with a message stating that
the record has been modified by someone else. You get options to go ahead
and save (and over write the other persons changes), or copy to clip board,
or not save.
ALL RECORDS.
In a multi user environment, this is not much use, since the instant you
open the form, then no else can get in. however, for some setup screens or
maintenance type screens that edits special application or setup data, then
this is good choice.
EDITED RECORD
This is one you want for multi user. If two users are looking at the
same record, and HAVE NOT changed anything, then no big deal. The INSTANT
one user starts to edit, then all other users will see a lock icon in the
record selector bar (and, if you don't show the record select, then the user
will get a beep, and message in the status bar). In this setup, whoever
starts editing the record is the one that gets the lock. However, all other
users can still view, and look at the record. They just can't edit it until
the person saves the record.
Also, you should set the option "open databases using record locking" (this
is in the advanced tab, and is usually set by default).
you can open a bound form in design mode, display the properties sheet, data
tab, and then put your cursor in the Record locks setting, and hit the help
key...
note that these settings are of couse on a form by form bases, and thus this
setting is of couse in the front end that you put on EACH pc.
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
[email protected]
http://www.members.shaw.ca/AlbertKallal
You have two types of locking.
The default is useally what we call