R
ryguy7272
I’m suck on an Expression that should be pretty simple (I think). In the
Total line, I have Expression. In the Field line I have, “SUM:
Sum([tblRegion]![CUR_MTD_REV]+[tblRegion]![JUL])â€
Basically, I am trying to sum all the Current Month To Date revenue and the
July revenue, for all Sales Reps, but I only have to do this for Inventory
Class of type Class2.
I am getting some VERY bizarre results. For instance, one sales rep should
have about $48,000 and Access is telling me that the rep has $4.8 million.
Clearly something is wrong, but I can’t figure out what.
SQL:
SELECT tblRVP_Mapping.RVP, tblRVP_Mapping.Director, tblRVP_Mapping.[Sales
Rep], tblRegion.inventoryClass, tblRegion.CUR_MTD_REV, tblRegion.JUL,
Sum([tblRegion]![CUR_MTD_REV]+[tblRegion]![JUL]) AS [SUM]
FROM (tblRM_MediaSales2008 INNER JOIN tblRVP_Mapping ON
tblRM_MediaSales2008.SalesRep = tblRVP_Mapping.[Sales Rep]) INNER JOIN
tblRegion ON tblRVP_Mapping.[Sales Rep] = tblRegion.SalesRep
GROUP BY tblRVP_Mapping.RVP, tblRVP_Mapping.Director, tblRVP_Mapping.[Sales
Rep], tblRegion.inventoryClass, tblRegion.CUR_MTD_REV, tblRegion.JUL
HAVING (((tblRegion.inventoryClass)="Class2"));
If anyone can tell me what is wrong here I would really appreciate it.
Finally, I would like to sum a few more elements, but I think I can figure
out how to do that, as soon as I understand the required logic.
Thanks so much,
Ryan---
Total line, I have Expression. In the Field line I have, “SUM:
Sum([tblRegion]![CUR_MTD_REV]+[tblRegion]![JUL])â€
Basically, I am trying to sum all the Current Month To Date revenue and the
July revenue, for all Sales Reps, but I only have to do this for Inventory
Class of type Class2.
I am getting some VERY bizarre results. For instance, one sales rep should
have about $48,000 and Access is telling me that the rep has $4.8 million.
Clearly something is wrong, but I can’t figure out what.
SQL:
SELECT tblRVP_Mapping.RVP, tblRVP_Mapping.Director, tblRVP_Mapping.[Sales
Rep], tblRegion.inventoryClass, tblRegion.CUR_MTD_REV, tblRegion.JUL,
Sum([tblRegion]![CUR_MTD_REV]+[tblRegion]![JUL]) AS [SUM]
FROM (tblRM_MediaSales2008 INNER JOIN tblRVP_Mapping ON
tblRM_MediaSales2008.SalesRep = tblRVP_Mapping.[Sales Rep]) INNER JOIN
tblRegion ON tblRVP_Mapping.[Sales Rep] = tblRegion.SalesRep
GROUP BY tblRVP_Mapping.RVP, tblRVP_Mapping.Director, tblRVP_Mapping.[Sales
Rep], tblRegion.inventoryClass, tblRegion.CUR_MTD_REV, tblRegion.JUL
HAVING (((tblRegion.inventoryClass)="Class2"));
If anyone can tell me what is wrong here I would really appreciate it.
Finally, I would like to sum a few more elements, but I think I can figure
out how to do that, as soon as I understand the required logic.
Thanks so much,
Ryan---