I have a contractor timesheet system in which timesheets are manually entered and reports are run based on these. What I want to do is be able to show on a report the Week to Date costs inccured.
In a query, I have assigned each timesheet entry a Week No (1-52), Year No and Month No. What I want the below code to say in the query is to sum the costs of each timesheet where the value in the Week column is equal to the DatePart "ww" (week), for today's date. Ie, I have three timesheets that are entered for yesterday and one for monday. I want the costs on all four to be registered as they are in the same week as today. The code I have is as follows. It keeps giving me the error that I tried to execute a query that does not include ContractDesc in the aggregate function.
TWCost: Sum(IIf([qryIncurredCosts.Week]=(DatePart("ww",[Date()])),"[Cost]","0"))
Ideas? Questions? Comments?
TIA
Leah
In a query, I have assigned each timesheet entry a Week No (1-52), Year No and Month No. What I want the below code to say in the query is to sum the costs of each timesheet where the value in the Week column is equal to the DatePart "ww" (week), for today's date. Ie, I have three timesheets that are entered for yesterday and one for monday. I want the costs on all four to be registered as they are in the same week as today. The code I have is as follows. It keeps giving me the error that I tried to execute a query that does not include ContractDesc in the aggregate function.
TWCost: Sum(IIf([qryIncurredCosts.Week]=(DatePart("ww",[Date()])),"[Cost]","0"))
Ideas? Questions? Comments?
TIA
Leah