Results 1 to 4 of 4
  1. #1
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126

    Subtraction in an Aggregate query

    I have a list of baseball opponents that shows the number of games scheduled and the number of games played. The [Count of Opponet] being scheduled games and [SumOfGameCount] the completed games. I keep getting errors. How can I get this to work in an aggregate query?



    Code:
    Remaining:=Sum( [CountOfOpponet] - [SumOfGameCount] )
    Jim O

  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,652
    For starters, in a query you wouldn't want the =.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126
    Thanks, I am still getting a message Subqueries cannot be used in the expression(Remaining:Sum( [CountOfOpponet] - [SumOfGameCount] ).

    Jim O

  4. #4
    JimO is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    126
    Got it to work.

    Remaining:[CountOfOpponet] - [SumOfGameCount]

    Jim O

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

Similar Threads

  1. Aggregate Query - Need Help
    By nerd__ in forum Queries
    Replies: 5
    Last Post: 11-19-2012, 03:34 PM
  2. date subtraction in query
    By mejia.j88 in forum Queries
    Replies: 1
    Last Post: 03-29-2012, 02:28 PM
  3. Aggregate Query
    By DonL in forum Queries
    Replies: 1
    Last Post: 08-04-2011, 09:54 AM
  4. Help in aggregate query
    By somm in forum Queries
    Replies: 1
    Last Post: 02-15-2011, 10:18 AM
  5. Using an Aggregate in a query
    By jbh02 in forum Queries
    Replies: 0
    Last Post: 09-15-2009, 07:29 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