不要动不动就“没看懂”,如果一句代码都看不懂,建议好好从头看看帮助,或者视频:http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&Id=67187比如:
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
If Filter > "" Then
Tables("文理分科").Filter = Filter
End If