Results 1 to 2 of 2

Thread: Sum (2003)

  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Posts
    164
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sum (2003)

    I have a query which returns the following sample results:

    Name, Address, City, State, Zip, Invoice, Amount
    John, 1 Street, Beverly Hills, CA, 90210, INV1, $5.00
    John, 1 Street, Beverly Hills, CA, 90210, INV2, $10.00
    John, 1 Street, Beverly Hills, CA, 90210, INV3, $5.00
    Tom, 2 Street, Beverly Hills, CA, 90210, INV4, $1.00
    Tom, 2 Street, Beverly Hills, CA, 90210, INV5, $2.00

    My question is this. Is it possible to instead return two records with a sum on the Amount (I'm going to hide the Invoice column), like so...
    John, 1 Street, Beverly Hills, CA, 90210, $20.00
    Tom, 2 Street, Beverly Hills, CA, 90210, $3.00

    Thanks in advance!

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

    Re: Sum (2003)

    Create a new query based on your query.
    Select View | Totals or click the Totals button on the toolbar.
    Add all fields except Invoice.
    Set the Total option for Amount to Sum (leave the rest to the default Group By).

    You could obtain the same result in your original query, but then you must remove the Invoice field from the query.

Posting Permissions

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