Time Totals - Report

G

Guest

I am having a problem totalling time on a report.

I'm doing a simple report. I need to show the time each volunteer serves on
a daily basis. Each detail line for the volunteer contains the StartTime &
EndTime values. Each field is formatted Medium Time. I have a calculation
that correctly computes the hours and minutes for each line
[EndTime]-[StartTime]. My problem is getting a total for each volunteer. I
have created a text box to sum the calculated time lines for each person. I
have formatted that box Medium Time. I keep getting an #Error for the total
when I preview the report.

Any suggestions would be appreciated !!!
 
M

Marshall Barton

destinman said:
I'm doing a simple report. I need to show the time each volunteer serves on
a daily basis. Each detail line for the volunteer contains the StartTime &
EndTime values. Each field is formatted Medium Time. I have a calculation
that correctly computes the hours and minutes for each line
[EndTime]-[StartTime]. My problem is getting a total for each volunteer. I
have created a text box to sum the calculated time lines for each person. I
have formatted that box Medium Time. I keep getting an #Error for the total
when I preview the report.


Might be more than one problem here.

The #Error is probably caused by the way you're trying to
calculate the sum. I'll need more details about this to be
sure, but I think you'll need to use something like:

=Sum(DateDiff("n", StartTime, EndTime))

Even if you get that straigtened out, a duration is not a
time value and often can not be formatted using a time
format. If the above correctly calculates the total number
of minutes, then you can display the total number of hours
and minutes in another text box by using the expression:

=TotalMins \ 60 & ":" & Format(TotalMins Mod 60, "00")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top