Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sum Total in a Report Footer (2003)

    I'm trying to obtain the Sum Total in the Routsecxx report footer of the attached mdb using
    =Sum([text23])
    but I get a message asking to enter a parameter value.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sum Total in a Report Footer (2003)

    You can't sum the value of a control such as text23. You can only sum an expression that refers to fields in the report's record source. So you must change the control source of text15 to
    <code>
    =Sum(rates([rate],[tapelength])*0.11666)
    </code>
    Moreover, you must move the code for the rates and roundup functions to a standard module. You don't need the reference to the Excel object library any more, unless you use it elsewhere in the database.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sum Total in a Report Footer (2003)

    Thank you so much Hans,
    I'm trying to make it so that when the value of the rate field in the tblFilesFromFolder table is "fax", the report's text22 text box value shouldn't display so I've changed the Rates function thus:<font color=448800>
    Public Function rates(varToTest As String, tape As Double)
    Select Case varToTest
    Case "*3"
    rates = Roundup(tape) * 3
    Reports!routsecxx!Text22.Visible = True
    Case "*4"
    rates = Roundup(tape) * 4
    Reports!routsecxx!Text22.Visible = True
    Case "*5"
    rates = Roundup(tape) * 5
    Reports!routsecxx!Text22.Visible = True
    Case "*2"
    rates = Roundup(tape) * 2 + 5
    Reports!routsecxx!Text22.Visible = True
    Case "

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sum Total in a Report Footer (2003)

    It doesn't make sense to set the visibility of Text22 in the rates function. You must do this in the On Format event of the detail section:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.Text22.Visible = Not (Me.rate = "fax")
    End Sub

    Take the statements setting the visibility of Text22 out of the rates function.

Posting Permissions

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