1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access 2007 Query : Calc based on Sum

Discussion in 'Business Applications' started by DigitalMedic, Feb 16, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. DigitalMedic

    DigitalMedic Thread Starter

    Joined:
    Feb 16, 2012
    Messages:
    2
    Hi all,

    I've been struggling with this for a while, so I hope someone can help.

    I'm using Access 2007 and have am using a TOTALS query which has a column that returns the SUM of HoursWorked

    My problem is that I want to add a column which calculates two columns in this query and gives me the result of Total_Invoice: Rate * HoursWorked

    Obviously I need the SUMMED value of hours worked in this calculation.

    Is this possible?

    Note:
    I've tried changing it to a MAKE TABLE query and trying to do this calculation in an update query, but I can't get an update query to update the Total_Invoice column based on Rate * HoursWorked

    Any and all help greatly appreciated.

    Rob
     
  2. DigitalMedic

    DigitalMedic Thread Starter

    Joined:
    Feb 16, 2012
    Messages:
    2
    Changed the query to a Select query (as it was a Make Table query).
    Then ran another query based on the first one and was able to perform the required calculations that way.

    If it is possible to do it within a single query I'd be happy to know how!

    Rob
     
  3. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    It is possible to have a "query within a query", ie nested queries. The "inner" query is run first and then the outer query.
    You can also use "Join" queries as well.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1041306