Dim tp1 As WinForm.DateTimePicker = Forms("小计").Controls("DateTimePicker1")
Dim tp2 As WinForm.DateTimePicker = Forms("小计").Controls("DateTimePicker2")
DataTables("入库小计").Fill("select 规格名称 ,sum(入库数) as 合计 from rk where 入库时间 between '" & tp1.Value & " ' and '" & tp2.Value & "' group by 规格名称","数据源名称",True)