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 & "预计开始日期 < '" & .Value.adddays(1)& "'"
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
If Filter >"" Then
e.Form.controls("项目总表").Table.DataTable.LoadPage = 0
e.Form.controls("项目总表").Table.DataTable.LoadFilter = Filter
e.Form.controls("项目总表").Table.DataTable.Load
End If