Код:
if form_otchet.ComboBox1.ItemIndex=0 then
DataModule2.ADOQuery1.SQL.Add('where ФИО='''+Edit1.Text+'''');
if form_otchet.ComboBox1.ItemIndex=1 then
DataModule2.ADOQuery1.SQL.Add('where Адрес='''+Edit1.Text+'''');
или так:
Код:
if form_otchet.ComboBox1.ItemIndex=0 then
DataModule2.ADOQuery1.SQL.Add('where ФИО like ''%'+Edit1.Text+'%''');
if form_otchet.ComboBox1.ItemIndex=1 then
DataModule2.ADOQuery1.SQL.Add('where Адрес like ''%'+Edit1.Text+'%''');
__________________
Жизнь такова какова она есть и больше никакова.
Помогаю за спасибо.
|