procedure SetFilter(dbf :integer; s :string);

SetFilter sets a filter. The filter expression could be simple or complex.
The function does not change an order of records in a file. When a table is filtered then you cannot use some functions like DeleteRecord, InsertRecord.
You can use the following operations: =, <>, >, <, ==, ~.
The following math operators: +, -, *, /
& - means logical AND. | - means logical OR.

var dbf :integer; begin dbf := OpenBase( 'filename.dbf' ); if dbf <> 0 then begin SetFilter(dbf, 'NAME=Andy'); showmessage( RecCount(dbf) ); SetFilter(dbf, 'NAME=Andy&BIRTH>1980'); showmessage( RecCount(dbf) ); CloseBase(dbf); end; end.