Results 1 to 4 of 4
  1. #1
    accessnovice78 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Apr 2012
    Posts
    2

    Query that sums data

    Hi,

    I am a complete novice at Access and have been thrown in at the deep end by my boss.

    I have written the most basic queries thanks to my friend google but now I have encountered something a bit more difficult, my boss is demanding information and I can not figure out how to make my query work.

    I have the following fields in my query.

    Financial Year
    Descrpition
    Customer Name
    Author
    Net Sales
    Net Value of Sales

    I would like to create the query so that it returns back the Total Net Value of Sales by Customer by Description, ideally that top 100 customers. If I do run the query I have written at the moment I get more than the 65000 lines which I can not export in to excel.

    Any suggestions on how to overcome this would be much appreciated.

    I am a complete and utter novice.



    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I changed your thread title to something more meaningful to future users than "Query driving me nuts!".

    Try starting a new query with those 3 fields. On the toolbar/ribbon you'll see a Totals icon that looks like a greek "E". Click on that, and you'll see a new row appear in your query (in design view). Change Group By to Sum for the value field and see if that is doing what you want.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    accessnovice78 is offline Novice
    Windows 7 64bit Access 2002
    Join Date
    Apr 2012
    Posts
    2
    Thanks for the hint about the title name and the suggestion.

    I have tried using the totals and the query returns back more rows than can be exported in to excel. Is there any way around this?

    Cheers

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    But it's correctly totaling by customer and description like you want? You can add the TOP predicate to the query to limit the records returned, or add a criteria to the value field so it only returns those that total more than a given amount. Given the grouping you may want this:

    http://support.microsoft.com/kb/153747/en-us
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 03-23-2012, 09:45 AM
  2. Query that sums a field based on 2 tables
    By scratchmb in forum Queries
    Replies: 6
    Last Post: 03-18-2012, 08:31 PM
  3. Sum of Sums?
    By Chameleon in forum Reports
    Replies: 1
    Last Post: 03-14-2012, 06:32 PM
  4. query that sums the data for me
    By citygov in forum Queries
    Replies: 4
    Last Post: 08-18-2011, 03:25 PM
  5. Replies: 1
    Last Post: 07-10-2011, 11:20 PM

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