Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009

    Unanswered: Query help - cannot have memo,ole or hyperlink object in aggregate argument

    I'm fairly new to access and cannot figure out how to properly sum up table entries using a query. I am trying to do a count of all Years and add up all Service Reports by year, by their names. I created a field for year that takes the year value of each date associated with each service report -
    Year: Year([ServiceCompletedDate]) which works fine. I have an expression that also counts the years and adds up similar years which works fine as - Count: Count([Year])
    However, since I want to add up the Service Names with the dates I choose sum under them, but this causes the error. How can I add the service types together with common years so I can see how many of the same service reports were done by year? I thought this way made sense but I keep getting this error no matter what. All data is being queried from the same table. Thanks for any assistance.

  2. #2
    weejas is offline Grumpy old man (training)
    Join Date
    Sep 2006
    Surrey, UK
    Provided Answers: 17
    The error message implies that you're trying to apply an aggregate function (count, sum, max, etc) to a data type that cannot be used in aggregate functions. Check the field type of the Service Names field.

    Also, did you really mean to say that you selected Sum under the Service Names field? Sum will only work on numeric data.
    10% of magic is knowing something that no-one else does. The rest is misdirection.
    Beers earned: 2

  3. #3
    Join Date
    Nov 2007
    Adelaide, South Australia
    Maybe you need Count instead of Sum?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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