关于查询窗口的设计,看看: http://www.foxtable.com/help/topics/1058.htm 单单日期的话,插入两个日期输入框:
Dim Filter As String With e.Form.Controls("StartDate") If .Value IsNot Nothing Then 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 Dim b As New CrossTableBuilder("统计表1",DataTables("订单")) b.HGroups.AddDef("客户") b.VGroups.AddDef("产品") b.Totals.AddDef("数量") b.Filter = Filter b.Build Maintable = Tables("统计表1")
|