*** If this is a PRG function or procedure IF NOT RLOCK("....") && Forgot the name of the table :o) MessageBox("The record is already locked", 64,"Record Lock") RETURN ENDIF .... *** Do Your code UNLOCK IN .... && See my comment on the first line :o)) *** IF you want this in FORM ** In INIT Event of the form IF NOT RLOCK("....") MessageBox("The record is already locked", 64,"Record Lock") RETURN .f. ENDIF ** In DESTROY event of the form UNLOCK IN .... && See my comment on the first line :o))