CLOSE TABLES FOR i = 1 to ADBOBJECTS(laTables, "Table") IF !EMPTY(laTables[i]) IF !USED(laTables[i]) USE (laTables[i]) IN 0 EXCL SELECT (laTables[i]) WAIT WINDOW "Reindexing : " + UPPER(ALLTRIM(laTables[i])) + ".DBF" NOWAIT PACK REINDEX ELSE MESSAGEBOX('Other Users on Network may be using the system'+; chr(13)+'Cannot Reindex if others are using the system',16,'Network Conflict') Thisform.release ENDIF ENDIF ENDFOR CLOSE TABLES