在“表A”项目“二级分类”已选择的情况项下筛选,如何将如下两段编码合并?
Dim txt As String = e.Form.Controls("TextBox1").Text
Dim tbl As Table = Tables("表A")
If txt = "" Then
tbl.Filter = ""
Else
txt = "'*" & txt & "*'"
'条件一
tbl.Filter = "项目名称 Like " & txt & " Or 拼音缩写 Like " & txt
'条件二
Tables("表A").Filter = "[一级分类] = '" & Tables("加载项").Current("一级分类") & "'And [二级分类] = '" & Tables("加载项").Current("二级分类") &"'"
[此贴子已经被作者于2012-2-15 11:47:10编辑过]