28,409
社区成员




yamount=int(year(date())-2005+1) '从2005到今年共几年
for k=1 to yamount
y&k& = 2004+int(&k&) '循环一一列出来
next
ExecuteGlobal "xMoney" & i & "=" & rsx("Money" & i)
dim a
redim a(year(date)-2005)
for i=2005 to year(date)
a(i)=i
next
'调用数组吧
for i=1 to 12
sqlx="select sum(T_Money) as Money"&i&" from Client where year(T_Key)='2008' and int(month(T_Key))='"&i&"' "
set rsx=server.CreateObject("adodb.recordset")
rsx.open sqlx,conn,1,1
ExecuteGlobal "xMoney" &i& "= "rsx("Money"&i&"")
rsx.Close
set rsx=nothing
next
yamount=int(year(date())-2005+1) '从2005到今年共几年
for k=1 to yamount
ExecuteGlobal "y" & k & "= 2004 + " & k
next