以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  统计  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=173810)

--  作者:outcat
--  发布时间:2021/12/17 10:30:00
--  统计
光纤盒表

设备名称   容纳户数   安装户数
  接线盒1 10

用户宽带表

用户名称    设备名称 
张三          接线盒1
李四          接线盒1

老师,麻烦一下,我现在有这两个表,当用户宽带表 用到 光纤盒表中对应的设备名称时,自动更新这个  安装户数,自己弄了,怎么也统计不对,请老师赐教

--  作者:有点蓝
--  发布时间:2021/12/17 10:34:00
--  
参考:http://www.foxtable.com/webhelp/topics/1472.htm

If e.DataCol.Name = "设备名称" Then
    Dim
 Filter As String = "[
设备名称] = \'" & e.NewValue & "\'"
    e.
DataRow("
安装户数") = DataTables("用户宽带表").Compute("count(设备名称 )", Filter)
End
 If