Hello Everybody,


I have a question about access charts as this is my first time working with them....I have a report that calculates clients wages and sums them up and it also does other calculations which am not concerned about here. the report works perfectly fine. I have thrown a column chart at the report footer which has a query that finds the sum of wages and groups them by the program the clients work for. when i run the report, the wages sum of the first program is correct, but the rest are wrong! heres the query:

SELECT Clients.Program, Sum(((DateDiff("m",IIf([Clients]![Date Started]<=[Forms]![Main Form]![startDateClientsTxt],[Forms]![Main Form]![startDateClientsTxt],[Clients]![Date Started]),IIf([Clients]![End Date]<=[Forms]![Main Form]![endDateClientsTxt],[Clients]![End Date],[Forms]![Main Form]![endDateClientsTxt]),0))*(((([NumberOfHours]*[Wages])*4.3)-((([NumberOfHours]*[Wages])*4.3)*0.07))*0.5))) AS Savings
FROM Clients
GROUP BY Clients.Program;

Does anybody know wheres the issue is which am not catching?

Thanks in advance