Dim Filter As String
With e.Form.Controls("syth")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "世源图号 like \'*" & .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
Tables("订单明细表").Filter = Filter
End If