function RecCount(dbf :integer): integer;

RecCount returns a number of records in a dbf file. If a table is filtered then RecCount returns an actual number of records.

Be careful. The first record has a number 0 and the last record has a number RecCount-1.

var dbf :integer; begin dbf := OpenBase( 'filename.dbf' ); if dbf <> 0 then begin showmessage( RecCount(dbf) ); CloseBase(dbf); end; end.