With e.Form.Controls("DateTimePicker5") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "提交时间 >= '" & .Value & "'" End If End With With e.Form.Controls("DateTimePicker6") If .Value IsNot Nothing Then If Filter >"" Then Filter = Filter & " And " End If Filter = Filter & "提交时间 < '" & .Value.AddDays(1) & "'" End If End With