I am using Access 2007 and having trouble getting a running total in a query.
Here is the basic data, coming from a table called tblLabourHours2
ID (autonumber generated)
Formatted Cost Code
TransDate
Hours
My goal is to get a running total of hours for each cost code. A cost code may have hours for several different dates.
I need to know the running total for each date within a cost code since I may run reports/queries based on a date range.
The columns of my query has ID, Formatted Cost Code, TransDate, Hours, and the following expression in the next column
Expr1: DSum("Total Hours","tblLabourHours2","Formatted Cost Code = " & [Formatted Cost Code] & " And ID <=" & [ID])
I get #ERROR in the expression column.
What am I doing wrong?
Here is the basic data, coming from a table called tblLabourHours2
ID (autonumber generated)
Formatted Cost Code
TransDate
Hours
My goal is to get a running total of hours for each cost code. A cost code may have hours for several different dates.
I need to know the running total for each date within a cost code since I may run reports/queries based on a date range.
The columns of my query has ID, Formatted Cost Code, TransDate, Hours, and the following expression in the next column
Expr1: DSum("Total Hours","tblLabourHours2","Formatted Cost Code = " & [Formatted Cost Code] & " And ID <=" & [ID])
I get #ERROR in the expression column.
What am I doing wrong?