Hello,
I am trying to build a query that subtotals the amount of hours worked and earnings made per pay period for each employee. I built a Payroll table with employee name, start time, end time, lunch in, lunch out, hourly rate and added these fields to my query to form new fields with expressions to calculate the total hours worked per day (end time- start time) and the earnings made per day (total hours worked per day x hourly rate)and now I would like to subtotal the hours worked and earnings made per payperiod for each employee.
I put the criteria for the date field between #1/30/2012#and#2/5/2012#, which is the pay period I want to look at, and I tried grouping the sum of my new field expressions (hours worked per day, earnings made per day) and when I try to run the query summing both expressions, a message pops up saying, "subqueries cannot be used in the expression ([total hours]*[hourly rate])". When I try grouping the sum of one expression, for example the earnings made per day expression field, a message pops up saying, "you need to execute a query that does not include the specified expression '([end time]-[start time])'".
How do I subtotal and grand total my hours and earnings for each employee for the specified date range?