Case "下次检定日期" filter = "([运维状态] is null or [运维状态] <> '检定')" If ksrq.Value IsNot Nothing Then Filter = Filter & " and 下次检定日期 >= #" & ksrq.Value.Date & "#" End If If jsrq.Value IsNot Nothing Then Filter = Filter & " and 下次检定日期 < #" & jsrq.Value.Date.adddays(1) & "#" End If Tables("杭康设备总表").Filter = filter