Dim filter As String = "(1=2" For Each dc As Col In CurrentTable.Cols filter &= " or convert(" & dc.Name & ",'System.String') like '%" & e.Form.Controls("TextBox1").Text & "%'" Next filter = filter & ") and (1=2 " For Each dc As Col In CurrentTable.Cols filter &= " or convert(" & dc.Name & ",'System.String') like '%" & e.Form.Controls("TextBox2").Text & "%'" Next filter = filter & ") and (1=2 " For Each dc As Col In CurrentTable.Cols filter &= " or convert(" & dc.Name & ",'System.String') like '%" & e.Form.Controls("TextBox3").Text & "%'" Next filter = filter & ")" CurrentTable.Filter = filter
|