增加一个按钮 或 在 leave 事件中(按回车后执行) :
Dim txb1 As WinForm.TextBox = Forms("窗口1").Controls("TextBox1")
'这里先筛选出你要得年份
Tables("窗口1_Table1").Sort = "日期"
Dim Filter As String = "[_identify] = " & Tables("窗口1_Table1")(Tables("窗口1_Table1").count -3,"_identify") & ""
Filter = Filter & " Or [_identify] = " & Tables("窗口1_Table1")(Tables("窗口1_Table1").count -2,"_identify") & ""
Filter = Filter & " Or [_identify] = " & Tables("窗口1_Table1")(Tables("窗口1_Table1").count -1,"_identify")
Tables("窗口1_Table1").Filter = Filter
[此贴子已经被作者于2010-9-5 0:32:24编辑过]