筛选代码片段写:
dim strwh as string
strwh="True"
if isnull(me.年.value)=false then
strwh=strwh & " and year(发货日期)=" & me.年.value
if isnull(me.月.value)=false then
strwh=strwh & " and month(发货日期)=" & me.月.value
end if
end if
me.子窗体.form.filter=strwh
me.子窗体.form.filteron=true