Dim tbl As Table=e.Form.Controls("Table1").Table
Dim txt As String = trim(e.Sender.Text)
Try
If txt = "" Then
tbl.Filter = ""
Else
txt = "'%" & Functions.Execute("RealStr",txt) & "%'"
Dim Filter As String
For Each c As Col In tbl.Cols
If c.IsString Then
Filter=Filter & c.name &" Like " & txt & " Or "
Else If c.IsNumeric AndAlso IsNumeric(txt) Then
Filter=Filter & c.Name & "="& replace( replace(txt,"'",""),"%","") & " Or "
End If
Next
Filter=left(Filter,Filter.Length-3) '此处的代码 我记得有一个endWiths("Or") ? 具体想不起来了
tbl.filter=Filter
End If
Catch ex As Exception
End Try