在button的click事件中加入
Dim txt As String = e.Form.Controls("TextBox1").TextDim tbl As Table = Tables("窗口1_Table1")If txt = "" Then tbl.Filter = ""Else txt = "'*" & txt & "*'" tbl.Filter = "代码 Like " & txtEnd If