G
Guest
I have one query that calculates the amount of work an employee has booked. I
have another query that calculates the amount they have been paid. I now want
to create a query that calculates the amount they are owed (booked - paid).
Here are my queries:
qryBookedByEmployee:
SELECT qrySumLineTotalsByEmployee.EmployeeID,
qrySumLineTotalsByEmployee.TransactionTypeID,
qrySumLineTotalsByEmployee.BookedInPaidOut AS Booked
FROM qrySumLineTotalsByEmployee
WHERE (((qrySumLineTotalsByEmployee.TransactionTypeID)=1));
qryPaidToEmployee:
SELECT qrySumLineTotalsByEmployee.EmployeeID,
qrySumLineTotalsByEmployee.TransactionTypeID,
qrySumLineTotalsByEmployee.BookedInPaidOut AS Paid
FROM qrySumLineTotalsByEmployee
WHERE (((qrySumLineTotalsByEmployee.TransactionTypeID)=2));
I think this could be done straight from qrySumLineTotalsByEmployee, but
I'll need the above two queries anyway so I may as well use them here. Any
ideas how I can calculate the amount owed? There can be many transactions of
the same type (Booked or Paid) and there will not always be an equal number
of types (maybe 3 booked transactions and only 1 paid transaction).
Thanks
Dave
have another query that calculates the amount they have been paid. I now want
to create a query that calculates the amount they are owed (booked - paid).
Here are my queries:
qryBookedByEmployee:
SELECT qrySumLineTotalsByEmployee.EmployeeID,
qrySumLineTotalsByEmployee.TransactionTypeID,
qrySumLineTotalsByEmployee.BookedInPaidOut AS Booked
FROM qrySumLineTotalsByEmployee
WHERE (((qrySumLineTotalsByEmployee.TransactionTypeID)=1));
qryPaidToEmployee:
SELECT qrySumLineTotalsByEmployee.EmployeeID,
qrySumLineTotalsByEmployee.TransactionTypeID,
qrySumLineTotalsByEmployee.BookedInPaidOut AS Paid
FROM qrySumLineTotalsByEmployee
WHERE (((qrySumLineTotalsByEmployee.TransactionTypeID)=2));
I think this could be done straight from qrySumLineTotalsByEmployee, but
I'll need the above two queries anyway so I may as well use them here. Any
ideas how I can calculate the amount owed? There can be many transactions of
the same type (Booked or Paid) and there will not always be an equal number
of types (maybe 3 booked transactions and only 1 paid transaction).
Thanks
Dave