BM: TBookmark;
begin
TheTable.DisableControls;
BM:= TheTable.GetBookmark;
try
LowTheFields:= Low(TheFields);
HighTheFields:= High(TheFields);
SFor:= UpperCase(SFor);
Result:= False;
if FromBeginning then TheTable.First;
if SearchBackwardthen begin
TheTable.Prior;
while not TheTable.BOF do begin
for i:= LowTheFields to HighTheFields do begin
if DoFindIn(TheTable.Fields[TheFields[i]], SFor) then begin
Result := True;
Break;
end;
end;
if Result then Break else TheTable.Prior;
end;
end else begin
TheTable.Next;
while not TheTable.EOF do begin
for i:= LowTheFields to HighTheFields do begin
if DoFindIn(TheTable.Fields[TheFields[i]], SFor) then begin
Result:= True;
Break;
end;
end;