我不会引用,只能复制了:
Dim Filter As String
With e.Form.Controls("ComboBox1")
If .Value IsNot Nothing Then
Filter = "录取批次 = '" & .Value & "'"
End If
End With
With e.Form.Controls("ComboBox2")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "文理分科 = '" & .Value & "'"
End If
End With
With e.Form.Controls("ComboBox3")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "录取年度 = '" & .Value & "'"
End If
End With
If e.Form.Controls("GF").text > ""
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "平均分差值 <= " & e.Form.Controls("GF").text
End If
If e.Form.Controls("DF").text > ""
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "平均分差值 >= " & e.Form.Controls("dF").text
End If
If Filter > "" Then
Tables("年度院校提档线").Filter = Filter
End If
老师,上面这段代码中,如果加上一列逻辑标记,语句如何加。比如:在“年度院校提档线”表中有一列逻辑列,筛选得出结果后,在这个逻辑列中打上对勾。这个语句如何添加?谢谢老师!
[此贴子已经被作者于2018/7/11 7:38:24编辑过]