select sum(num) as numtatol from table where 条件dim i as double i=rs.fields("numtatol ").value
Set Rs = Conn.Execute(" select sum(费用合计) from 某用户的费用 where 收费年份= " & y & " and 收费月份= " & m & " and state='1' ")
Conn.Execute(" select sum(费用合计) from 某用户的费用 where 收费年份= " & y & " and 收费月份= " & m & " and state='1' ") 是不是应该直接这样写呀。
if rs.state=adstateopen then rs.close rs.open " select sum(费用合计) from 某用户的费用 where 收费年份= " & y & " and 收费月份= " & m & " and state='1' ",conn,adopenkeyset,adlockreadonly
i=rs.fields("numtatol ").value
是不是应该直接这样写呀。
rs.open " select sum(费用合计) from 某用户的费用 where 收费年份= " & y & " and 收费月份= " & m & " and state='1' ",conn,adopenkeyset,adlockreadonly