Results 1 to 2 of 2

Thread: [RESOLVED] Access Report Totals = 0

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Resolved [RESOLVED] Access Report Totals = 0

    Hi, I am trying to display a few column totals in the report footer and for some reason they are showing up as 0 every time. I am using the following code to calculate them:

    VB Code:
    1. Option Compare Database
    2. Dim lPartyTotal As Long
    3. Dim lHostessTotal As Long
    4. Dim lSampleTotal As Long
    5. Dim lKitTotal As Long
    6. Dim lPieceTotal As Long
    7. Dim lDollarTotal As Long
    8.  
    9.  
    10. Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    11. lPartyTotal = lPartyTotal + Me.Party_QTY
    12. lHostessTotal = lHostessTotal + Me.Hostess_QTY
    13. lSampleTotal = lSampleTotal + Me.Sample_QTY
    14. lKitTotal = lKitTotal + Me.Kit_QTY
    15. lPieceTotal = lPieceTotal + Me.Total_Piece_QTY
    16. lDollarTotal = lDollarTotal + Me.Total_Dollar_Amount
    17.  
    18. End Sub
    19.  
    20. Private Sub Report_Open(Cancel As Integer)
    21. lPartyTotal = 0
    22. lHostessTotal = 0
    23. lSampleTotal = 0
    24. lKitTotal = 0
    25. lPieceTotal = 0
    26. lDollarTotal = 0
    27.  
    28. End Sub
    29.  
    30. Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
    31. Me.txtTotalParty = lPartyTotal
    32. Me.txtTotalHostess = lHostessTotal
    33. Me.txtTotalSample = lSampleTotal
    34. Me.txtTotalKit = lKitTotal
    35. Me.txtTotalPiece = lPieceTotal
    36. Me.txtTotalDollar = lDollarTotal
    37.  
    38. End Sub

    Anyone know what I am doing wrong?

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: Access Report Totals = 0

    I tried the code in ReportFooter_Print also....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width