Dim Filter As String
With e.Form.Controls("线别1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "线别 = '" & .Value & "'"
End If
End With
With e.Form.Controls("加工工序1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "加工工序 = '" & .Value & "'"
End If
End With
With e.Form.Controls("成品描述1")
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("工作内容1")
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("成品编码1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "成品编码 = '" & .Value & "'"
End If
End With
With e.Form.Controls("审核人员1")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "线长审核 = '" & .Value & "'"
End If
End With
With e.Form.Controls("姓名1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "姓名 = '" & .Value & "'"
End If
End With
With e.Form.Controls("生产批次1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "生产批次 = '" & .Value & "'"
End If
End With
With e.Form.Controls("计算标准1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "计算标准 = '" & .Value & "'"
End If
End With
With e.Form.Controls("使用设备1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "使用设备 = '" & .Value & "'"
End If
End With
With e.Form.Controls("工作日期1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "工作日期 >= '" & .Value & "'"
End If
End With
With e.Form.Controls("工作日期2")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "工作日期 <= '" & .Value & "'"
End If
End With
If Filter >"" Then
e.Form.controls("操作工工时").Table.DataTable.LoadPage = 0
e.Form.controls("操作工工时").Table.DataTable.LoadFilter = "([杂工种类] <> '加班申请' or [杂工种类] <> '调休申请'or [杂工种类] <> '事假申请') And " & IIf(filter > "", filter, "1=1")
e.Form.controls("操作工工时").Table.DataTable.Load
End If
Tables("操作工工时明细_操作工工时").Sort = "工作日期 DESC"
DataTables("操作工工时明细_操作工工时").DataCols("计算标准").RaiseDataColChanged()