Dim Filter As String = "" Dim Val As String = Forms("窗口1").Controls("TextBox1").Value if Val is nothing then MessageBox.Show("对不起,请先输入查找内容!", "提示") Else For each c As col In CurrentTable.Cols If c.IsString Then If Filter > "" Then Filter = Filter & " Or " End If Filter = Filter & c.Name & " Like '*" & Val & "*'" End If Next CurrentTable.Filter = Filter end if