动态合成条件求值即可,比如
Dim d As Date = new Date(2012, 1, 1)
Dim Filter = "日期 >= #" & d & "# and 日期 < #" & d.AddYears(1) & "#"
Dim sum = DataTables("订单").Compute("sum(金额)", filter)
Dim max = DataTables("订单").Compute("max(金额)", filter)
Dim min = DataTables("订单").Compute("min(金额)", filter)
msgbox(sum)
msgbox(max)
magbox(min)