LOCAL cErrorHandler * ----- Store the current error handler cErrorHandler = ON("error") * ----- Turn Error Handler off ON ERROR * * ----- Attempt exclusive open SELECT 0 USE mytable EXCLUSIVE * ---- Reset error handler ON ERROR &cErrorHandler IF NOT USED("mytable") * ----- File wasn't opened * Add appropriate code here ELSE * ----- File opened exclusively * Add appropriate code here ENDIFHope this helps,