Ian,
RLOCK() and FLOCK() both will attempt to lock a record or file and if they succeed the functions return .T. Your code;
IF RLOCK() = .T.
is locking the record (BTW, you don't need the = .t. at all).
If you want to know if the rlock failed (because someone else has it locked then use code like this;
IF NOT RLOCK()
Wait window "Somebody else is working on this record
ELSE
UNLOCK
ENDIF