老师些,本人小白一枚,我通过筛选后再进行小计数量,如何把得到的小计写入表B对应的单元格里呀?

此主题相关图片如下:meid2jijvc((2piq@nr5i.png

Dim Filter As String
With e.Form.Controls("StartDate")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "系统建立 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("EndDate")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "系统建立 <= #" & .Value & "#"
End If
End With
If e.Form.Controls("rdigh").Checked = True
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "排除 = false"
End If
If Filter > "" Then
Tables("表A").Filter = Filter
End If
Dim t As Table = Tables("表A")
Dim g As Subtotalgroup
t.SubtotalGroups.Clear()
t.GroupAboveData = True
t.TreeVisible = False
t.SpillNode = True
g = New Subtotalgroup
g.Aggregate = AggregateEnum.Count
g.GroupOn = "二级机构"
g.TotalOn = "二级机构"
g.Caption = "{0} 小计"
t.SubtotalGroups.Add(g)
t.Subtotal()
[此贴子已经被作者于2018/10/7 13:53:52编辑过]