Foxtable(狐表)用户栏目专家坐堂 → 筛选


  共有1580人关注过本帖树形打印复制链接

主题:筛选

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


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/6/20 10:41:00 [显示全部帖子]

 Dim name As String = "李四"

 Dim count1 as integer = DataTables("表A").Compute("count(_Identify)", "第三列 = '" & name & "'")

 Dim count2 as integer = DataTables("表A").Compute("count(_Identify)", "")

 Forms("窗口1").Controls("TextBox1").Text = count1 & "," & (count2-count1)

[此贴子已经被作者于2017/6/20 11:02:55编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/6/20 11:03:00 [显示全部帖子]

 

Dim name As String = "李四"

Dim count1 As Integer = DataTables("表A").Compute("count(_Identify)", "第三列 = '" & name & "'")

Dim count2 As Integer = DataTables("表A").Compute("count(_Identify)", "")

Forms("窗口1").Controls("TextBox1").Text = count1 & "," & (count2-count1)

name = "李四"

count1 = DataTables("表B").Compute("count(_Identify)", "第三列 = '" & name & "'")

count2 = DataTables("表B").Compute("count(_Identify)", "")

Forms("窗口1").Controls("TextBox2").Text = count1 & "," & (count2-count1)


 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/6/20 14:24:00 [显示全部帖子]

Dim name As String = "李四"

Dim d As Date = "2017-06-20"

Dim count1 As Integer = DataTables("表A").Compute("count(_Identify)", "第三列 = '" & name & "' and 日期 = #" & d & "#")

Dim count2 As Integer = DataTables("表A").Compute("count(_Identify)", "日期 = #" & d & "#")

Forms("窗口1").Controls("TextBox1").Text = count1 & "," & (count2-count1)

name = "李四"

count1 = DataTables("表B").Compute("count(_Identify)", "第三列 = '" & name & "'  and 日期 = #" & d & "#")

count2 = DataTables("表B").Compute("count(_Identify)", "日期 = #" & d & "#")

Forms("窗口1").Controls("TextBox2").Text = count1 & "," & (count2-count1)


 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/6/20 15:51:00 [显示全部帖子]

你把DataTables改成Tables就可以了。

 回到顶部