cmd.Comm andText="Select count(*) fro m {预算录入明细库} where 下达年度 ='" & year & "'and 资金来源= '" & zjly & "' is not null And 预算资金性质='" & yszjxz & "'is not null And 预算下达部门='" & ysxdbm & "' and 预算实施部门='" & ysssbm & "'is not null and 一级科目='" & kmmc & "'"
If cmd.Ex ecut eSc alar>0 Then
cmd1.Comm andText="select * fr om {预算录入明细库} where 下达年度 ='" & year & "'and 资金来源= '" & zjly & "' is not null and 预算资金性质='" & yszjxz & "'is not null and 预算下达部门='" & ysxdbm & "' and 预算实施部门=='" & ysssbm & "'is not null and 一级科目='" & kmmc & "'"
Else
上述代码执行有问题,主要还是空值的问题,您能不能帮我解决!非常感谢