wfcform.adoquery1.sql.add('select * from wwfa'); if edit1.text<>' then begin wfcform.adoquery1.sql.add('where wnf=''+edit1.text+''); end; if combobox1.text<>'所有' then begin wfcform.adoquery1.sql.add('and wjj=''+combobox1.text+''); end; if combobox2.text<>'所有' then begin wfcform.adoquery1.sql.add('and wjl1=''+combobox2.text+''); end; if combobox3.text<>'所有' then begin wfcform.adoquery1.sql.add('and wjl2=''+combobox3.text+''); end; if edit2.text<>' then begin wfcform.adoquery1.sql.add('and wjb like '%'+edit2.text+'%''); end; if edit3.text<>' then begin wfcform.adoquery1.sql.add('and wjz like '%'+edit3.text+'%''); end;