Dim Filter As String
With e.Form.Controls("ComboBox1")
If .Value IsNot Nothing Then
Filter = Filter & "时间 like '%" & .Value & "%'"
End If
End With
With e.Form.Controls("cmbProduct")
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("DateTimePicker1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "截止日期 >= '" & .Value & "'"
End If
End With
With e.Form.Controls("DateTimePicker1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "截止日期 <= '" & .Value & "'"
End If
End With
' Tables("派工").Filter &= " and 交单 <> '取消'" 派工表有《交单列》,筛选时不显示 交单列 包含取消的取消的行
If Filter > "" Then
DataTables("派工").LoadFilter = Filter
DataTables("派工").Load()
End If
派工表有《交单列》,筛选时 不显示 交单列 包含取消的取消的行