Here is the SQL statement:
Code:
SELECT yp_adv_data.ID, yp_team_ipm.strEmp, yp_adv_data.adIDate, -Sum([yp_adv_data].[adBox9]) AS SumOfadBox9, -Sum(yp_adv_data.ad216) AS SumOfad216, -Sum(yp_adv_data.adIBRep) AS SumOfadIBRep, -Sum(yp_adv_data.adOBRep) AS SumOfadOBRep, -Sum(yp_adv_data.adEmailChk) AS SumOfadEmailChk, -Sum(yp_adv_data.adSave) AS SumOfadSave, -Sum(yp_adv_data.adSaved) AS SumOfadSaved, -Sum(yp_adv_data.adReCall) AS SumOfadReCall, -Sum(yp_adv_data.adSME) AS SumOfadSME, -Sum(yp_adv_data.adSMEA) AS SumOfadSMEA, -Sum(yp_adv_data.adSMS) AS SumOfadSMS, -Sum(yp_adv_data.adSMSTA) AS SumOfadSMSTA, -Sum(yp_adv_data.adSMST) AS SumOfadSMST, -Sum(yp_adv_data.adIBCalls) AS SumOfadIBCalls, -Sum(yp_adv_data.ad30d) AS SumOfad30d, -Sum(yp_adv_data.adCA) AS SumOfadCA, -Sum(yp_adv_data.adPro) AS SumOfadPro, -Sum(yp_adv_data.adProA) AS SumOfadProA, -Sum(yp_adv_data.adSCall) AS SumOfadSCall, Sum(yp_adv_data.adRevCol) AS SumOfadRevCol, Sum(yp_adv_data.adNewRev) AS SumOfadNewRev, Sum(yp_adv_data.adReRev) AS SumOfadReRev, Sum(yp_adv_data.adImpRev) AS SumOfadImpRev
FROM yp_team_ipm INNER JOIN yp_adv_data ON yp_team_ipm.strEmp = yp_adv_data.strEmp
GROUP BY yp_adv_data.ID, yp_team_ipm.strEmp, yp_adv_data.adIDate
HAVING (((yp_team_ipm.strEmp) Like [forms]![yp_teamli]![ipm_member]) AND ((yp_adv_data.adIDate) Between [forms]![yp_teamli]![date_start] And [forms]![yp_teamli]![date_end]));
In the fields on the form it is not totaling the records it is only showing the value of the first record.