原代码运行正常,如下: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 IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "飞行日期 >= #" & .Value & "#"
End If
End With
If Filter > "" Then
Tables("事件统计_Table1").Filter = Filter
End If
想增加一个筛选条件:事件的性质为“严重' 或轻度",最后一句我写成:b.Filter = Filter & "And 性质 = '严重' or 性质 = '轻度'",报错。
应该加在哪儿?谢谢