on line for a question!! thirsty!!
有这样一个问题:我的表中有下列几行
姓名,单位,发放时间
如果我想过滤:第一次过滤条件:显示某单位的所有信息,第二次过滤条件:显示满足发放时间的数据(前提条件是:在第一次过滤出的信息中显示)代码?/
string str,str1,year,month
//判断输入项是否为空
str1=trim(ddlb_1.text)
month=trim(ddlb_2.text)
year=trim(sle_1.text)
if str1="" or isnull(str1) then
messagebox("提示","请选择单位!")
ddlb_1.setfocus()
return
end if
//按条件过滤
dw_1.setfilter("szdw ='"+ str1 +"'")
dw_1.filter()
if year="" or isnull(year) then
messagebox("提示","请输入年份!")
sle_1.setfocus()
return
end if
if month="" or isnull(month) then
messagebox("提示","请选择月份!")
ddlb_2.setfocus()
return
end if
str=year + month
//按条件过滤
string dw
dw=mid(dw_1.getitemstring(1, "szdw"),1,40)
if str1=trim(dw) then
dw_1.setfilter("FFSJ ='"+ str +"'")
dw_1.filter()
dw_1.retrieve()
elseif str1<>trim(dw) then
Messagebox("提示","没有符合条件的数据")
return
end if