Dim Filter As String
With e.Form.Controls("dingdanbianhao")
If .Value IsNot Nothing Then
Filter = "订单编号 = '" & .Value & "'"
End If
End With
With e.Form.Controls("kehumingchen")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "客户名称 = '" & .Value & "'"
End If
End With
With e.Form.Controls("yanse")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "颜色 = '" & .Value & "'"
End If
End With
With e.Form.Controls("StartDate")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "下单日期 >= #" & .Value & "#"
End If
End With
With e.Form.Controls("EndDate")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "下单日期 <= #" & .Value & "#"
End If
End With
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & " 已割框 = " & e.Form.Controls("yigekuang").checked
If Filter > "" Then
Tables("T120").Filter = Filter
End If