ник: Pioner
проверил по первым полям результаты:
rstDAO!SumOfCommission = 108
rstADO!SumOfCommission = 54
и т.д.
на всякий случай даю содержимое запросов.
Запрос qryAboveBucketSPIFF:
SELECT tblAboveBucket.CEC_ID, qrySpiffSummary.[Email ID], qrySpiffSummary.A0, qrySpiffSummary.D0, qrySpiffSummary.A4, qrySpiffSummary.A2, qrySpiffSummary.CTS3200, qrySpiffSummary.CTS3000, qrySpiffSummary.CTS1000, qrySpiffSummary.CTS500, qrySpiffSummary.H4, tblAboveBucket.BonusPercent AS SumOfPercentAllocated, [H4]*[SumOfPercentAllocated]/100 AS SumOfCommission, qrySpiffSummary.Shipped, qrySpiffSummary.[Average Split]
FROM (tblAboveBucket INNER JOIN tblCC ON tblAboveBucket.CEC_ID = tblCC.CC) INNER JOIN qrySpiffSummary ON tblCC.Email = qrySpiffSummary.[Email ID]
WHERE (((tblAboveBucket.CEC_ID)='ctzortzi'));
Запрос: qrySpiffSummary
SELECT tblEmployee.[Email ID], tblTransactions.A0, tblTransactions.D0, tblTransactions.A4, tblTransactions.A2, tblTransactions.E0 AS CTS3200, tblTransactions.E1 AS CTS3000, tblTransactions.E2 AS CTS1000, tblTransactions.E3 AS CTS500, tblTransactions.H4, Sum(tblTotalAllocation.PercentAllocated) AS SumOfPercentAllocated, Sum(tblTotalAllocation.Commission) AS SumOfCommission, tblTransactions.OnHold, tblTransactions.Shipped, tblTransactions.SPIFF_Split AS [Average Split]
FROM tblTransactions INNER JOIN (tblEmployee INNER JOIN tblTotalAllocation ON tblEmployee.[Email ID] = tblTotalAllocation.PersonName) ON tblTransactions.TrID = tblTotalAllocation.TrID
GROUP BY tblEmployee.[Email ID], tblTransactions.A0, tblTransactions.D0, tblTransactions.A4, tblTransactions.A2, tblTransactions.E0, tblTransactions.E1, tblTransactions.E2, tblTransactions.E3, tblTransactions.H4, tblTransactions.OnHold, tblTransactions.Shipped, tblTransactions.SPIFF_Split
HAVING (((tblTransactions.OnHold)=False));