s=""
if len(text1.text)>0 then s=s & "and 建单人='" & Text1.Text & "' "
end if
if len(Combo1.Text)>0 then s=s & "and 单号='" & Combo1.Text & "' "
end if
s=mid(s,4)
s="select 单号,操作日期,建单人 from 数据库where " & s & " and 操作日期>=#" & DTPicker1.Value & "# and 操作日期<=#" & DTPicker2.Value & "# ;"