Hi,
also ich mach das wie folgt:
Delphi-Quellcode:
procedure TForm1.Edit2Change(Sender: TObject);
begin
IF TRIM(Edit2.Text) <> '' THEN
BEGIN
Table1.Filtered := True;
END
ELSE
BEGIN
Table1.Filtered := False;
END;
end;
... und dann im OnFilterRecord Event
Delphi-Quellcode:
procedure TForm1.Table1FilterRecord(DataSet: TDataSet; var Accept: Boolean);
type
TFilterOption = (foCaseInsensitive, foNoPartialCompare);
TFilterOptions = set of TFilterOption;
begin
if edit2.Text <> '' then
begin
Accept:= Pos(UpperCase(Edit2.Text),UpperCase(Table1.FieldByName('Text').AsString)) > 0;
end;
end;
Geht einwandfrei ohne Joker (*)
Gruß
Sigi