Dim Filter As String
With e.Form.Controls("StartDate1")
If .Value IsNot Nothing Then
Filter = " 日期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("EndDate1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & " 日期 <= #" & .Value & "#"
End If
End With
With e.Form.Controls("ComboBox1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "年份= '" & .Value & "'"
End If
End With
With e.Form.Controls("ComboBox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "季节= '" & .Value & "'"
End If
End With
Dim g As New GroupTableBuilder("加盟净发", DataTables("客户"))
g.Groups.AddDef("年份")
g.Groups.AddDef("季节")
g.Totals.AddDef("加盟净发数量")
g.Totals.AddDef("加盟净发吊牌")
g.VerticalTotal = True
g.SubTotal = True
g.Decimals = 2
g.Filter = Filter
g.Build()
Forms("动态动销").open
MainTable = Tables("动态动销")
我在“动态动销”这个窗口中设置了个筛选统计按钮 怎么不用重新打开窗口 就能更新窗口中的数据