Dim cb1 As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim cb2 As WinForm.ComboBox = e.Form.Controls("ComboBox2")
Dim d1 As Date = new Date(val(cb1.text),val(cb2.text),1)
Dim filter As String
filter="日期 >= #" & d1 & "# And 日期<#" & d1.AddMonths(1) & "#"
DataTables("出入库").LoadFilter=filter
DataTables("出入库").Load
Dim tb1 As WinForm.Table = e.Form.Controls("Table3")
tb1.Table.Cols("基本数量").GrandTotal = True '指定要合计的列
tb1.Table.Cols("辅助数量").GrandTotal = True
tb1.Table.Cols("标签费").GrandTotal = True
tb1.Table.Cols("换托费").GrandTotal = True
tb1.Table.Cols("拆箱费").GrandTotal = True
tb1.Table.Cols("运输费").GrandTotal = True
tb1.Table.Cols("装卸费").GrandTotal = True
tb1.Table.GrandTotal = True '显示合计模式
Tables("查询仓储费_Table3").AutoSizeCols()
是汇总模式
[此贴子已经被作者于2018/3/12 15:10:53编辑过]