Results 1 to 5 of 5
  1. #1
    Alfie is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2020
    Posts
    2

    Sum query results


    I have several queries. I want to sum how many results are found in each query each time i run them. I.e query 1 = 40 results query 2 = 25 results. How do i do this?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    More info required. Post query SQL and provide an example showing input and expected output.
    Welcome to the forum.

  3. #3
    Alfie is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2020
    Posts
    2
    I dont have any query SQL to provide an example sorry. Just wonder if is possible to sum how many results are found on a query. I have query A, i run it and the number of results that the query found is displayed.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    and explain what a "result" is. Is that a field name and you want to sum all of the values in that field that the query returns?
    Or are you asking for a count of the records returned. If the latter, you can use a sql statement in a query calculated field if that's where you want it:
    theCount: (SELECT COUNT(*) FROM [query1])
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Maybe have a look at this explaing how to add a totals row to your query:
    https://support.microsoft.com/en-us/...click%20Totals.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 6
    Last Post: 08-21-2019, 07:17 AM
  2. Replies: 2
    Last Post: 04-15-2017, 11:09 AM
  3. Replies: 5
    Last Post: 05-21-2013, 02:21 PM
  4. Replies: 3
    Last Post: 05-02-2013, 10:36 AM
  5. Replies: 6
    Last Post: 05-14-2012, 07:24 AM

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