Notify use that the record is locked for editing?

jonathanchye

Registered User.
Local time
Today, 08:01
Joined
Mar 8, 2011
Messages
448
Hi all,

I've a DB with is currently split into a FE/BE structure. The db is developed in AC2010.

I run a few complex calculations at form level and I have set record locking in that form to "Edited Record". This works great but if another user on the network opens up the same record it causes a lot of problems with my form (I think its because some of the calculation code is trying to update the "locked" record)

Is there anyway of notifying users that the record is currently locked for editing? Perhaps also a flag so I don't run calculations on locked records ?
 
personsally, i would not lock records

are each of your users using a differrent copy of the datbase (front end). Sharing a copy might be the problem in your scenario.

otherwise, maybe reconsider the logic of what you are trying to do ...
 
personsally, i would not lock records

Not to derail the thread, but why wouldn't you lock a record?

In a multiuser environment 2 people editing the same record could cause potential problems.
 
Last edited:
Not to derail the thread, but why wouldn't you lock a record?

In a multiuser environment 2 people editing the same record could cause potential problems.

because the chance of this happening (ie 2 people editing the same record) is actually very slight in most systems - the problem only affects users making changes, not users just inspecting a record. furthermore, access actually uses a technique called optimistic locking. it assumes the write will be ok, but immediately before it undertakes the write, it re-reads the record (LOCKED!), and as long as it hasn't changed it know it can write the change.

If it HAS changed you get the "another user changed your record" message.

Thre thing about record locking is that you need to hold locks for the minimum time necessary. It is not a good idea to read a record into a form to edit it, and lock it straight away. A user could leave it locked for an extended period, and "cripple" your application. so you need to be very careful about managing locks
 

Users who are viewing this thread

Back
Top Bottom