A
Anne
Here is my expression:
TotalHours: DSum("Hours","tblHoursCalculated ","EmployeeId<=" &
[MyEmployeeID] & "dayofweek<=" & [Mydayofweek])
MyEmployee and MyDayofWeek are aliases
All items are numeric fields.
Pertinent fields in table TblHoursCalculated are:
Hours - numeric
EmployeeID - numberic with Alias of MyEmployeeId
DayofWeek (representing 1st thru last day of week) with Alias of
MyDayofWeek, 1st day of the week is Wednesday
I am trying to get a column which adds the hours per day by employee so I
can determine where overtime starts.
I am not sure if I even needed to convert the workdate to a day of the week.
The actual date should be enough.
Here is what I am trying to tatal:
employee 1 -07/13/05 employee Hours worked 8 - Total 8 hrs
employee 1- 07/14/05 employee Hours worked 8 - Total 16 hrs
employee 1 -07/15/05 employee Hours worked 10 - Total 26
employee 1 -07/18/05 employee Hours worked 10 - Total 36
employee 1 -07/19/05 employee Hours worked 10 - Total 46
next
employee 2- 07/13/05 employee Hours worked 9 - Total 9 hrs
employee 2- 07/14/05 employee Hours worked 8 - Total 17 hrs
employee 2 -07/15/05 employee Hours worked 10 - Total 27
employee 2 -07/18/05 employee Hours worked 12 - Total 39
employee 2 -07/19/05 employee Hours worked 10 - Total 49
next
and so on and so on
Seems simple, but all I get is #Error
I think I have a problem with just getting the right brackets or comma and
apostrohhies
Oh, another question, can this be run on a query instead of a table?
Anne
Using Access 2003 in 2000 format
Anne
TotalHours: DSum("Hours","tblHoursCalculated ","EmployeeId<=" &
[MyEmployeeID] & "dayofweek<=" & [Mydayofweek])
MyEmployee and MyDayofWeek are aliases
All items are numeric fields.
Pertinent fields in table TblHoursCalculated are:
Hours - numeric
EmployeeID - numberic with Alias of MyEmployeeId
DayofWeek (representing 1st thru last day of week) with Alias of
MyDayofWeek, 1st day of the week is Wednesday
I am trying to get a column which adds the hours per day by employee so I
can determine where overtime starts.
I am not sure if I even needed to convert the workdate to a day of the week.
The actual date should be enough.
Here is what I am trying to tatal:
employee 1 -07/13/05 employee Hours worked 8 - Total 8 hrs
employee 1- 07/14/05 employee Hours worked 8 - Total 16 hrs
employee 1 -07/15/05 employee Hours worked 10 - Total 26
employee 1 -07/18/05 employee Hours worked 10 - Total 36
employee 1 -07/19/05 employee Hours worked 10 - Total 46
next
employee 2- 07/13/05 employee Hours worked 9 - Total 9 hrs
employee 2- 07/14/05 employee Hours worked 8 - Total 17 hrs
employee 2 -07/15/05 employee Hours worked 10 - Total 27
employee 2 -07/18/05 employee Hours worked 12 - Total 39
employee 2 -07/19/05 employee Hours worked 10 - Total 49
next
and so on and so on
Seems simple, but all I get is #Error
I think I have a problem with just getting the right brackets or comma and
apostrohhies
Oh, another question, can this be run on a query instead of a table?
Anne
Using Access 2003 in 2000 format
Anne