Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree("报价明细表", "客户编号")
trv.Nodes.Insert("显示所有行",0)
上面代码中客户编号如何加入筛选, 只显示未订购的并只显示今年的报价的客户编号
'-----------------------------筛选本年度未报价----------------------------------------
Dim y As Integer = Date.Today.Year
Dim dt1 As New Date(y, 1, 1)
Dim dt2 As New Date(y, 12, 31)
Dim Filter As String
Filter = "已订购 = false and 报价日期 >= #" & dt1 & "# And 报价日期 <= #" & dt2 & "#"
Tables("报价未订购_报价明细表").Filter = Filter
'-----------------------------筛选本年度的报价----------------------------------------