With e.Form.Controls("RQ1") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "日期 >= " & .value End If End With With e.Form.Controls("RQ2") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " End If Filter = Filter & "日期 <= " & .value End If End With