Dim Filter As String
With e.Form.Controls("办事处")
If .text > "" Then
Filter = "办事处 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("VIN码")
If .text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "VIN码 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("主机厂")
If .text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "主机厂 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("承运单位")
If .text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "承运单位 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("上游品牌")
If .text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "上游品牌 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("车辆类型")
If .text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "车辆类别 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("上游起点")
If .text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "上游起点 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("上游终点")
If .text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "上游终点 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("实际起点")
If .text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "实际起点 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("实际终点")
If .text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "实际终点 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("终点省份")
If .text > "" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "终点省份 like '%" & .text & "%'"
End If
End With
With e.Form.Controls("调起")
If .value <> Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "调度日期 >= '" & .value & "'"
End If
End With
With e.Form.Controls("调止")
If .value <> Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "调度日期 <= '" & .value & "'"
End If
End With
If e.Form.Controls("全段").text = "是" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "全段 = True"
End If
If e.Form.Controls("全段").text = "否" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "全段 = False"
End If
If e.Form.Controls("首段").text = "是" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "首段 = True"
End If
If e.Form.Controls("首段").text = "否" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "首段 = false"
End If
If e.Form.Controls("二次").text = "是" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "[二次<br>运输] = True"
End If
If e.Form.Controls("二次").text = "否" Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "[二次<br>运输] = False"
End If
If Filter > "" Then
Tables("基础表").DataTable.loadfilter = Filter
Tables("基础表").DataTable.load
Else
Tables("基础表").DataTable.loadfilter = ""
Tables("基础表").DataTable.load
End If