Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2005
    Posts
    10

    Unanswered: Stuck with creating a Query in Access.

    I need help! I am stuck with creating a queery in Access (in design view) which calculates the average. The error message which i get is "You tried to execute a querry that does not include the specified Expression "Symbol" as part of an aggregate function.

    Formula which i am using is Sum([Readings].[Read1]+[Readings].[Read2]+[Readings].[Read3]+[Readings].[Read4])/4

    You can e-miail me on robert_duran@hotmail.com

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    Create the query directly through SQL view, as this will avoid any such issues.
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Mar 2005
    Posts
    10
    I have no idea how to do that...

  4. #4
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    Query => Design View => Right Click => SQL View
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  5. #5
    Join Date
    Mar 2005
    Posts
    10
    Thanks but i still have no idea what i need to do. I am no expert in access. It's a silly assignment which i am trying to do part of my course.

  6. #6
    Join Date
    Mar 2005
    Posts
    7

    Wink

    When creating/modifying the view go to "View-> SQL". Then in the SQL window type something like

    SELECT (read1 + read2 + read3 + read4)/4
    FROM Readings;

    If any of the fields can be empty (NULL) then the whole average value for this record would be NULL so you should prevent this using

    SELECT (Nz(read1,0) + Nz(read2,0) + Nz(read3,0) + Nz(read4,0))/4
    FROM Readings;

    HTH
    Last edited by emmi59; 03-10-05 at 08:27. Reason: Field names adopted

Posting Permissions

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