• Total of field on continuous forms (2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Total of field on continuous forms (2000)

    Author
    Topic
    #452225

    I have a continuous form. In the form footer, I’m trying to get the sum of txtExtended for all records.

    How would I manage that? Do I need a query of the underlying table?

    Viewing 0 reply threads
    Author
    Replies
    • #1115835

      =Sum([Quantity]*[Price]) would do the trick. You cannot sum txtExtended itself- you need to sum the formula in the ControlSource of txtExtended.

      • #1115900

        The formula for txtExtended is:
        =[txtQuantity]*([txtPrice]-([txtPrice]*[txtDiscount]/100))

        When I put a text box in the footer, I made the formula:
        =Sum([txtQuantity]*([txtPrice]-([txtPrice]*[txtDiscount]/100)))

        Unfortunately, it shows me #Error

        • #1115903

          We’d have to see the database to know what’s wrong.

          • #1115906

            I actually found the problem.

            The source for txtExtended should have been:
            =[Quantity]*([Price]-([Price]*[Discount]/100))

            I needed to reference the fields, not the text box names.

            • #1115907

              Yes, that’s related to SteveH’s advice. You can sum the values of fields and of expressions based on fields, but not the values of controls.

    Viewing 0 reply threads
    Reply To: Total of field on continuous forms (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: