Dim Filter As String
With e.Form.Controls("布控原因")
If .Value IsNot Nothing Then
Filter &= "布控原因 = '" & .Value & "'"
End If
End With
With e.Form.Controls("检查类别")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = filter & "(进检类别 = '" & .Value & "' or 出检类别='" & .Value & "')"
End If
End With
With e.Form.Controls("船名")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "中文船名 like '%" & .Value & "%'"
End If
End With
If e.Form.Controls("是否布控").checked = True Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = filter & "是否布控=1"
End If
If e.Form.Controls("是否核酸").checked = True Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = filter & "是否核酸抽查=1"
End If
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
With DataTables("检疫资料")
' If Filter > "" Then
.LoadFilter = Filter
' End If
.LoadOrder = "录入时间 Desc"
.LoadTop = 10
.Load()
End With
上一页:
With DataTables("检疫资料")
If .LoadPage > 0 Then
.LoadPage = .LoadPage - 1
.Load()
End If
End With
下一页:
With DataTables("检疫资料")
If .LoadPage < .TotalPages - 1 Then
.LoadPage = .LoadPage + 1
.Load()
End If
End With