以下是引用大红袍在2015/5/24 9:29:00的发言: For Each dc As Col In Tables("例会档案").Cols Filter &= "Convert(" & dc.Name & ",'System.String') like '%" & e.Form.Controls("TextBox1").Text & "%' or " Next Filter = "(" & Filter.SubString(0,Filter.Length-4) & ")"
主要代码是生成筛选条件。拼凑每一列形成这样的语句, (Convert(第一列,'System.String') like '%关键字%' or