I am having trouble bellow wit this query. I have the total regular hours and the overtime. The problem is that if it is 8 hours and under, I need it to show as regular hours. Any thoughts?
SELECT [EPT Regular Time Total Daily Query].[Employee Name], [EPT Regular Time Total Daily Query].Date, [EPT Regular Time Total Daily Query].[Sum Of Total Regular Time], IIf([Sum Of Total Regular Time]<=8,[TotalHours],8) AS [Regular Hours], Sum(([Sum Of Total Regular Time]-[Regular Hours])) AS Ot
FROM [EPT Regular Time Total Daily Query]
GROUP BY [EPT Regular Time Total Daily Query].[Employee Name], [EPT Regular Time Total Daily Query].Date, [EPT Regular Time Total Daily Query].[Sum Of Total Regular Time], IIf([Sum Of Total Regular Time]<=8,[TotalHours],8);
--
Message posted via http://www.accessmonster.com