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 & "#"
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") trv.BuildTree("报价明细表", "客户编号", filter) trv.Nodes.Insert("显示所有行",0)