Time Grand Total

A

Achez

Good morning, All:

I found a similar post from a few years back which (sort of) addresses
my problem. I've copied the relevant portion of the previous post
below:

******** (Start Quote)
I have a small database that I use to track my time on the job. The
database stores the Start Time and End Time for each task, then
calculates the duration of the task. The task duration is not stored,
but is calculated in a query as follows:

[Time Usage].[End Time]-[Time Usage].[Start Time] AS Duration

I have a report that is based on the query, and the task duration is
displayed as part of the report. The report groups tasks by category.

At the end of each category I have a field that sums the Duration
column
like this:

=Sum([Duration])

This works, and shows the total time for all the tasks in the category.

This field is named Sum of Duration (go figure!).
******* (End Quote)

My problem lies in that I am unable to sum the group. My particular
database tracks time spent on individual tasks as they relate to a
particular product (e.g. Product 1: Task 1 (2 hrs), Task 2 (3 hrs),
Task 3 (4 hrs)). I want to be able to show a field that sums the
elapsed times for each task so that in the Group footer in the report
it shows 9 hours worth of tasks were spent on Product 1.

I built my report on a query. The query calculates elapsed time per
task through the expression: ElapsedTimeString([TimeIn],[TimeOut])
(refer to a Microsoft Access Article for the associated module code at
http://office.microsoft.com/en-au/assistance/HA011102181033.aspx).
When I then insert a text box into the report with the data source of
=Sum([TimeSpent]), I get the following error: Data type mismatch in
criteria expression.

I hope I've provided enough information that someone can help me remedy
this little issue.

Kind regards,
Achez
 
D

Duane Hookom

Don't use the function ElapsedTimeString() in your query. As its name
suggests, it returns a "String" which can't be summed. Use the expression
from the previous post:
Duration: [TimeOut]-[TimeIn]
 

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