Multi-user file/record locking question

I'm using Delphi 1.0 in a multi-user environment and need to trap a "record in
use" exception that allows the program to just wait until the record is
available and then procede as normal.

If you can help I would appreciate it,

Tony Power