<Are your tables buffered using Cursorsetprop() and set to five?>
No, they are not. Data buffering is not enabled. These tables are accessed in random order; buffering would not help, as far as I can see.
If it's any help, here's the code fragment. The context is a purchase order system, here accessing the table to track po status. The mem var poslockflg is also used to enable/disable the Save button. The field ps_wholock keeps track of who locked the record:
use (postatusDB)in 0
select po_status
set order to ps_ponum
seek poid
poslockflg = lock()
if poslockflg then
replace ps_wholock with signonname
else
errmsg0 = "Hmmmm...."
errmsg1 = "The status record for that PO"
errmsg2 = "is locked by another user! ("+;
alltrim(po_status.ps_wholock)+"

"
errmsg3 = "You have read-only access."
do form ErrMsg
endif
scatter memvar memo
The code is intended to prevent more than one user from accessing the record as read/write and to tell that user who is locking the record. (Occasionally, someone will lock a record, then go to a meeting or lunch, tying the record up indefinitely.) The problem is that the second user gets a message that has a blank for ps_wholock. If I BROWSE the table at that point, the record is indeed blank, despite the first user's REPLACE. How come?
TIA,
Shanachie