Dim tb1 As String= "表名"
Dim txt As String = e.Form.Controls("TextBox1").Text
Dim zs As String
If txt = "" Then Return
txt = "'%" & txt & "%'"
zs = "列名1 Like " & txt & " Or 列名2 Like " & txt & " Or 列名3 Like " & txt & " Or 列名... Like " & txt ....
Tables(tb1).Filter=zs
Tables(tb1).AutoSizeCols
在窗口设置一个文本框 ,设置一个表控件,同时设置一个按钮。在按钮的Click事件加上上述代码即可!