procedure TForm3.RadioButton2Click(Sender: TObject);
begin
memo1.Text :='姓名';
end;
procedure TForm3.RadioButton4Click(Sender: TObject);
begin
memo1.Text :='部门'
end;
procedure TForm3.RadioButton5Click(Sender: TObject);
begin
memo1.Text :='职位'
end;
procedure TForm3.RadioButton3Click(Sender: TObject);
begin
memo1.Text :='性别'
end;
procedure TForm3.SpeedButton1Click(Sender: TObject);
begin
table1.Refresh ;
with table1 do
try
disablecontrols;
filtered:=false;
memo1.Text :=memo1.text+''''+edit1.Text +'''';
filter:=memo1.Text;
filtered:=true;
finally
enablecontrols;
if table1.RecordCount =0 then begin
messagebeep(1);
showmessage('没查到,请检查条件或放弃查询');
if messagedlg('是否继续查询?,注意:只有结束查询才可以做其它操作!',
mtinformation,[mbyes,mbno],0)=mrno then begin
filtered:=false;
table1.Close;
table1.Open ;end;
end else begin
if messagedlg('是否继续查询?,注意:只有结束查询才可以做其它操作!',
mtinformation,[mbyes,mbno],0)=mrno then begin
filtered:=false;
table1.Close;
table1.Open ;
end;
end;
end;
end;
end.