In click event: local lFileOpenSuccessful lFileOpenSuccessful = .t. On error do FileOpenErrorHandler with error(), lFileOpenSuccessful use TableXYZ in 0 on error do YourRegularErrorHandler with ... if lFileOpenSuccessful * do all your stuff here endif elsewhere: FUNCTION FileOpenErrorHandler lparameters nError, lFileOpenSuccessful *Some code here IF nError = 13 THEN &&Table not opened *Code that sends a message and then stops the execution *of the calling method lfileOpenSuccessful = .f. ENDIF ENDFUNCHTH,