下面一段代码,标红的部分,当面试室为空值时,进行筛选,代码不正确,请专家给指导,谢谢
Dim Filter As String
With e.Form.Controls("考生类别")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "考生类别 = '" & .Value & "'"
End If
End With
With e.Form.Controls("面试室")
If .Value Is 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
If .Value Is Nothing Then改为
If .Value IsNot Nothing Then