把开始日期当成结束日期,进行汇总,如汇总运输费用
Dim Filter As String
With e.Form.Controls("combobox2")
If .Value IsNot Nothing Then
Filter = " 车牌号码 = '" & .Value & "'"
End If
End With
With e.Form.Controls("combobox3")
If .Value IsNot Nothing Then
If Filter > "" Then
Filter = Filter & " And "
End If
Filter = Filter & "供应商名称 = '" & .Value & "'"
End If
End With
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
Dim 运输费用 As String = Tables("报表_Table1").DataTable.Compute("Sum(运输费用)",Filter )