function FieldNumber(dbf :integer; s :string): integer;

FieldNumber returns a number of the specified field. If there is no a field with a specified name then it returns -1.
Be careful. The first field has a number 0 and the last field has a number FieldCount-1

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