我有一“计件工资”主表和一“员工工资”子表
现在对子表“员工工资”的行用日期进行筛选,我想在筛选后的后面再增加一行用来显示当前“姓名”列的“小计”列里的数据合计
代码如下:
Dim Filter As String
With e.Form.Controls("cmbProduct")
If .Value IsNot Nothing Then
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
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
If Filter > "" Then
Tables("计件工资.员工工资").Filter = Filter
End If
请老师们帮忙,谢谢了