14-11-2018, 03:25 PM
كود :
var
a,b,c,fl:string;
begin
fl:='';
a:='(codofperson='+QuotedStr(edtgiab1.Text)+')';
b:='(themonth='+QuotedStr(cobgiab1.Text)+')';
c:='(theyeare='+QuotedStr(cobgiab2.Text)+')';
if CheckBox1.Checked then fl:=fl+a;
if CheckBox2.Checked then begin
if fl<>'' then fl:=fl+' and ';
fl:=fl+b;
end;
if CheckBox3.Checked then Begin
if fl<>'' then fl:=fl+' and ';
fl:=fl+c;
end;
if fl<>'' then tabel1.Filter:=fl;
tabel1.Filtered:=fl<>'';
if tabel1.IsEmpty then showmessage('لم يتم العثور على نتيجة');
رَبَّنَا اغْفِرْ لِي وَلِوَالِدَيَّ وَلِلْمُؤْمِنِينَ يَوْمَ يَقُومُ الْحِسَابُ


![[-]](https://delphi4arab.net/forum/D4A2020/collapse.png)