Currently my query looks like this:
This will take all the correct variables and then output the Call Center numbers ([Call Center]) via the formula you see. I need to adapt this query to other purposes however. In a NEW query, I would like to do the same thing for a different category. The [Call Center] becomes [Adjustments] and the formula for it is different. It needs to rely on multiple rows of data where it SUMs the [numVolume] field for FTEID=1,2,3,4 and then uses that number to run its final calculation. How can I do this? Sorry if its not well explained, kinda tough to write it out!
Code:
SELECT tblClients.numTransactionID, tblClients.numDirectAccounts, tblTransFTE.numFTEID, tblFTE.numFTECatID, tblTransFTE.numVolume, tblFTE.numPMO, Sum(IIf([numVolume]=0,[tblClients].[numDirectAccounts],[numVolume])*0.2/12/[tblFTE].[numPMO]) AS [Call center]
FROM tblFTE INNER JOIN (tblClients INNER JOIN tblTransFTE ON tblClients.numTransactionID = tblTransFTE.numTransactionID) ON tblFTE.numFTEID = tblTransFTE.numFTEID
GROUP BY tblClients.numTransactionID, tblClients.numDirectAccounts, tblTransFTE.numFTEID, tblFTE.numFTECatID, tblTransFTE.numVolume, tblFTE.numPMO
HAVING (((tblClients.numTransactionID)=[Forms]![frmClients].[numTransactionID]) AND ((tblFTE.numFTECatID)=2));