用GotoNearest()或者FindNearest()
GotoNearest()
eg.
with Table1 do
begin
SetKey;
FieldByName('State').AsString := 'CA';
FieldByName('City').AsString := 'Santana';
GotoNearest;
end;
FindNearest()
eg.
procedure TForm1.FormActivate(Sender: TObject);
begin
Table1.DatabaseName := 'DBDemos';
Table1.TableName := 'Customer.db';
Table1.Active := True;
Table1.IndexName := 'ByCompany';
end;
procedure TForm1.Edit1Change(Sender: TObject);
begin
Table1.FindNearest([Edit1.Text]);
end;