DSum for running daily total of hrs

G

Guest

Using fields:
JobDate
StartTime
EndTime
JobHrs
TotalHrsForThisDate

How can I use the DSUM formula to return TotalHrsForThisDate?

For Example:

Query should return the following:

JobDate StartTime EndTime JobHrs TotalHrsForThisDate
====== ====== ===== ==== =============
10/25/04 8:00 12:00 4 8
10/25/04 13:00 17:00 4 8
10/26/04 8:00 10:00 2 5
10/26/04 11:00 14:00 3 5
 
P

PC Datasheet

For the following, the assumption is that no job spans midnight.

Create a query based on your table that includes the fields JobID and a
calculated field, JobTime:[EndTime] - [StartTime]. Click on the Sigma (looks
like E) button on the toolbar at the top of the screen. Under JobTime change
Group By to Sum. Create a second query based on the previous query and your
table. Join on JobID. Pull down the fields: JobDate, StartTime and EndTime
from your table. Add a calculated field, JobHrs:[EndTime] - [StartTime].
Finally, enter the following expression in the fifth query field:
TotalHrsForThisDate:[SumOfJobTime]

The query will give you what you want.
 

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