Problems Summing an Expression..

  • Thread starter Thread starter dkuntz
  • Start date Start date
D

dkuntz

Guest
I have a field in a report that needs to be totaled
in a Footer.

In my query I have a field called 'MinofActualPUTIme' and 'MaxofActualDelTime'. The query is grouped by DriverNo and the whole idea is to show the time of his first and last delivery each day.
On the Report in the details section I need to total the # of hours he worked. This is what I have in the controlsource of [Text18]:
=DateDiff('h',TimeValue([MinOfActualPUTime]),TimeValue([MaxOfActualDelTime]))

Problem is in the 'DriverNo' footer I am having trouble summing each days hours worked. I've tried :
=Sum([Text18]) 'this doesn't work
=Sum(Val(DateDiff('h',TimeValue([MinOfActualPUTime]),TimeValue([MaxOfActualDelTime])))) 'this doesn't work
In the details section of the report I've tried creating a new textfield called 'HoursWorked' and in the controlsource putting:
=([Text18]). 'Works fine in details section but still doesn't sum in the footer - =Sum([HoursWorked]).

Any help is always appreciated!!
 
One untidy way, keep your textbox in the detail, set running total property to over all, set visible to no, then put a text box in footer =[HoursWorked]
 
Thanks that did it, accept you have to change the running sum property to Over Group instead of Over All.

Thanks Again!
 

Users who are viewing this thread

Back
Top Bottom