* Using COUNT: * Moves the record pointer, you may need to restore it: * Respects any FILTER currently in place: LOCAL lnOldRecNo, lnCount SELECT MyTable lnOldRecNo = RECNO() COUNT TO lnCount ALL FOR NOT DELETED() GOTO lnOldRecNo IN MyTable * Using SELECT: * Doesn't affect the record pointer * Does not respect any FILTER in place LOCAL ARRAY laArray SELECT ; COUNT(*) AS lnCount ; FROM MyTable ; WHERE NOT DELETED() ; INTO ARRAY laArray ?laArray[1]You need to be careful using the SELECT method as shown. For example, you can't use WHERE NOT DELETED("MyTable") because SELECT re-opens your table with a different (internal) alias. If you use DELETED("MyTable"), then your result will either be all the records in the table (if the current record in MyTable is not deleted), or zero (if the current record in MyTable is deleted).