Foxtable(狐表)用户栏目专家坐堂 → [求助] 快速筛选统计数量


  共有2491人关注过本帖平板打印复制链接

主题:[求助] 快速筛选统计数量

帅哥哟,离线,有人找我吗?
ade2015
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:161 积分:1306 威望:0 精华:0 注册:2020/3/14 22:13:00
[求助] 快速筛选统计数量  发帖心情 Post By:2020/9/29 13:54:00 [只看该作者]

以下是用来在窗口显示统计数量的代码,感觉大部分统计的执行在重复 ,实际显示也很慢。
求助1  :本人小白,那位大神帮忙简化一下,也可以甩个help链接
求助2  :有没有好的,统计方式,甩个help帮助链接也行

图片点击可在新窗口打开查看此主题相关图片如下:ade20200929.jpg
图片点击可在新窗口打开查看

Dim zzx As Integer
Dim sja As Integer
Dim sca As Integer
Dim faa As Integer
Dim sjw As Integer
Dim sjz As Integer
Dim scw As Integer
Dim scz As Integer
zzx = DataTables("maintable01").SQLCompute("Count(*)","项目编号 <> ' ' and 交货= '生产中'")
sja = DataTables("maintable01").SQLCompute("Count(*)","项目编号 <> ' ' and 交货= '生产中' and 项目类型='设计案'")
sca = DataTables("maintable01").SQLCompute("Count(*)","项目编号 <> ' ' and 交货= '生产中' and 项目类型='生产案'")
faa = DataTables("maintable01").SQLCompute("Count(*)","项目编号 <> ' ' and 交货= '生产中' and 项目类型='方案'")
sjw = DataTables("maintable01").SQLCompute("Count(*)","项目编号 <> ' ' and 交货= '生产中' and 设计状态='设计待分配'")
sjz = DataTables("maintable01").SQLCompute("Count(*)","项目编号 <> ' ' and 交货= '生产中' and 设计状态='设计中'")
scw = DataTables("maintable01").SQLCompute("Count(*)","项目编号 <> ' ' and 交货= '生产中' and 生产状态='生产未受理'")
scz = DataTables("maintable01").SQLCompute("Count(*)","项目编号 <> ' ' and 交货= '生产中' and 生产状态='生产中'")
Forms("主页").Controls("zzx").text = zzx
Forms("主页").Controls("sja").text = sja
Forms("主页").Controls("faa").text = faa
Forms("主页").Controls("sca").text = sca
Forms("主页").Controls("sjw").text = sjw
Forms("主页").Controls("sjz").text = sjz
Forms("主页").Controls("scw").text = scw
Forms("主页").Controls("scz").text = scz

[此贴子已经被作者于2020/9/29 14:21:07编辑过]

 回到顶部