2楼已经给你答案了,建议你先看看帮助,掌握一些基本的概念和方法,别人对你的帮助才有意义。
按钮1:
Dim txt As String = e.Form.Controls("TextBox1").Text
Dim tbl As Table = Tables("窗口1_Table1")
If txt = "" Then
tbl.Filter = ""
Else
txt = "'*" & txt & "*'"
tbl.Filter = "代码 Like " & txt
End If
按钮2
Dim txt As String = e.Form.Controls("TextBox1").Text
Dim tbl As Table = Tables("窗口1_Table2")
If txt = "" Then
tbl.Filter = ""
Else
txt = "'*" & txt & "*'"
tbl.Filter = "代码 Like " & txt
End If