Dim filter As String = "1=1"
If e.Form.controls("datetimepicker1").text <> "" Then filter &= "下单日期 = #" & e.Form.controls("datetimepicker1").text & "# "End If
If e.Form.controls("textbox1").value <> "" Then filter &= "订单编号 Like '%" & e.Form.controls("textbox1").Text & "%'End If
Tables("订单").filter = filter