CLOSE ALL CLOSE DATABASES OPEN DATABASE D:\SYSTEM\TABLES\ACCOUNT.DBC EXCLUSIVE = adbobjects(laTableArray, "TABLE") && Put table names into an array for i=1 to alen(latablearray) && loop through each table in the array mtablename=latablearray(i) && pick up table name from array =opentable(mtablename) && attempt to open table next x PROCEDURE OPENTABLE PARAMETERS M.TABLE ON ERROR DO MYERROR WITH ERROR(),MESSAGE(),MESSAGE(1),PROGRAM(),LINENO() USE (M.TABLE) IN 0 ON ERROR ENDPROC PROCEDURE MYERROR PARAMETERS M.ERROR,M.MESSAGE,M.MESSAGE1,M.PROGRAM,M.LINENO CLEAR ? 'Error number: ' + LTRIM(STR(m.error)) ? 'Error message: ' + M.MESSAGE ? 'Line of code with error: ' + M.MESSAGE1 ? 'Line number of error: ' + LTRIM(STR(m.lineno)) ? 'Program with error: ' + m.program WAIT RETURNHTH