Foxtable(狐表)用户栏目专家坐堂 → 记录数


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

主题:记录数

美女呀,离线,留言给我吧!
bm
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:437 积分:3463 威望:0 精华:0 注册:2011/9/13 23:27:00
记录数  发帖心情 Post By:2013/6/16 14:57:00 [只看该作者]

请高手帮忙优化下代码。如图要统计状态例不同状态记录数。显示在RibbonMenu.StatusBar.Message1 。如果有的话显示。没有的不用显示。

 


图片点击可在新窗口打开查看此主题相关图片如下:2013-06-16_14-53-53.jpg
图片点击可在新窗口打开查看

 

Dim f1,f2,f3 ,f4,f5,f6,f7,f8,f9 As String
f1 = "状态 = '接单'"
f2 = "状态 = '已派车'"
f3 = "状态 = '作业中'"
f4 = "状态 = '待收单'"
f5 = "状态 = '待结账'"

f6 = "状态 = '正结费'"
f7 = "状态 = '待确认'"
f8 = "状态 = '待审核'"
f9 = "状态 = '已审核'"
Dim c1 As Integer = Tables("业务大表").Compute("Count([_Identify])",f1)
Dim c2 As Integer = Tables("业务大表").Compute("Count([_Identify])",f2)
Dim c3 As Integer = Tables("业务大表").Compute("Count([_Identify])",f3)
Dim c4 As Integer = Tables("业务大表").Compute("Count([_Identify])",f4)
Dim c5 As Integer = Tables("业务大表").Compute("Count([_Identify])",f5)
Dim c6 As Integer = Tables("业务大表").Compute("Count([_Identify])",f6)
Dim c7 As Integer = Tables("业务大表").Compute("Count([_Identify])",f7)
Dim c8 As Integer = Tables("业务大表").Compute("Count([_Identify])",f8)
Dim c9 As Integer = Tables("业务大表").Compute("Count([_Identify])",f9)
RibbonMenu.StatusBar.Message1 =  "接单:" & c1 & "  已派车:" & c2 & "  作业中:" & c3 & "  待收单:" & c4 & "  待结账:" & c5 & "  正结费:" & c6 & "  待确认:" & c7 & "  待审核:" & c8 & "  已审核:" & c9

 


 回到顶部