Office中国论坛/Access中国论坛

标题: 多列单页小计 [打印本页]

作者: bluecard    时间: 2006-6-9 22:11
标题: 多列单页小计
跪求多列单页小计,请大师们帮忙!!!!!
作者: bluecard    时间: 2006-6-9 22:14
网上都是单项单页小计,小弟找过.那位高手可以指点,先谢
作者: eddieliu    时间: 2006-6-9 22:45
Private Dtemp As Double

Private Sub Report_Page()
'每开始一个新页将临时变量归为0
Dtemp = 0
End Sub

Private Sub 页面页脚_Print(Cancel As Integer, PrintCount As Integer)
'显示页合计
Me.txtpageSUM = Dtemp
End Sub

Private Sub 主体_Print(Cancel As Integer, PrintCount As Integer)
'累计本页数量
Dtemp = Dtemp + Me.数量
End Sub

作者: bluecard    时间: 2006-6-9 22:49
这只是数量一列,如果还有金额一列单页小计该如何写代码
作者: eddieliu    时间: 2006-6-9 23:23
哈哈

Private Dtemp As Double
Private Dtemp1 As Double



Private Sub Report_Page()
'每开始一个新页将临时变量归为0
Dtemp = 0
Dtemp1 = 0
End Sub



Private Sub 页面页脚_Print(Cancel As Integer, PrintCount As Integer)
'显示页合计
Me.txtpageSUM = Dtemp
Me.txtVaulSUM = Dtemp1
End Sub



Private Sub 主体_Print(Cancel As Integer, PrintCount As Integer)
'累计本页数量
Dtemp = Dtemp + Me.数量
Dtemp1 = Dtemp1 + Me.金额

End Sub

作者: bluecard    时间: 2006-6-9 23:59
万分感谢!搞定!




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3