Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:代码简化问题

1楼
ybmjy 发表于:2009/7/30 12:22:00
 这部份代码能简化吗,该怎样简化

 

dim a as Double

dim c as Double

dim d as Double

dim f as Double

dim g as Double

dim h as Double

dim m as Double

dim i as Double

dim b as String="1"

a=dataTables("fa piao管理").Compute("Sum(cl)","y = '"& b &"' ")

currenttable(0,"材料")=a

c=dataTables("fa piao管理").Compute("Sum(cl)","y = '"& b &"' ")

currenttable(0,"收入")= c

d=dataTables("fa piao管理").Compute("Sum(fl)","y = '"& b &"' ")

currenttable(0,"fl")= d

f=dataTables("fa piao管理").Compute("Sum(sf)","y = '"& b &"' ")

currenttable(0,"sf")=f

g=dataTables("fa piao管理").Compute("Sum(jm)","y = '"& b &"' ")

currenttable(0,"jm")= g

h=dataTables("fa piao管理").Compute("count(y)","y = '"& b &"' ")

currenttable(0,"srfp")= h

m=dataTables("流水帐").Compute("count(zc)","月 = '"& b &"' ")

currenttable(0,"zcfp")= m

i=dataTables("流水帐").Compute("Sum(zc)","月 = '"& b &"' ")

currenttable(0,"zc")=i

2楼
狐狸爸爸 发表于:2009/7/30 12:27:00

With dataTables("fa piao管理")
    currenttable(0,"材料")= .Compute("Sum(cl)","y = 1")

    currenttable(0,"收入")= .Compute("Sum(cl)","y = 1")
    ...
End With

3楼
czy 发表于:2009/7/30 12:31:00
dim a,c,d,e,f,g,h,m,i as Double

其它简化好象没多大意思。
4楼
ybmjy 发表于:2009/7/30 13:36:00

谢谢

共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .06641 s, 2 queries.