Results 1 to 4 of 4
  1. #1
    fuzbuster83 is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    5

    Sum Query

    I'm just starting to try to use Access to replace some of my Excel sheets so I'm not super familiar with all of it's abilities yet.

    Here is the basic layout of the table:


    Location Description Reason Cost Part#
    Dept1 x y $1.00 1
    Dept1 x y $1.50 1
    Dept1 x y $1.75 2
    Dept2 x y $1.50 2
    Dept2 x y $2.00 4
    Dept2 x y $3.00 5
    Dept3 x y $2.50 1
    Dept3 x y $3.50 8
    Dept4 x y $5.00 3

    What I'm trying do is make a report that will SUM all of the costs where the part# is 1, 2, etc. into something like

    Part# CostSum
    1 $5.00
    2 $3.25
    3 $5.00
    4 $2.00
    5 $4.00
    8 $3.50


    Obviously my database has much more information but that is the general idea. Can this be done in Access 2016?

  2. #2
    Hiche is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    2
    Hi,
    You will have to do a query using the part # , and the cost. In this query, you will add totals (group by for part # and sum for cost).
    Then you will do a report based on that query.

    Hope this is clear.

    Please let me know if you need help.

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,421
    Access reports a quite good at grouping, sorting and summing. You shouldn't need a query to perform what you're suggesting is a simple running total over group.
    Then again, you might have over simplified the situation at hand.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    fuzbuster83 is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    5
    Thanks everyone I was able to get the output I needed once I was told it was possible.
    I SQL View it looks like this
    SELECT [table].[column1], Sum([table].[column2]) AS [SumOfcolumn2]
    FROM [table]
    GROUP BY [table].[column1];

Please reply to this thread with any new information or opinions.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums