Multilevel elapsed times

P

Pret

I'm trying to develop a timeliner application, wherein the user enters times
and events and can report them out in sequence, along with elapsed times
from the first event in the sequence. Oversimplifying for the sake of
brevity, I have a query with an ID (Autonumber) field identifying the case
I'm timelining, with a DateTime (Date/Time) field and a Details (Text) field
recording the events of each case. I can query this with SQL, something
like:

SELECT A.ID, A.DateTime, A.Details, NZ(DateDiff("n", MIN(B.DateTime),
A.DateTime,"N/A") AS ElapsedTimeInMinutes
FROM qry1 AS A LEFT JOIN qry1 AS B ON (A.ID=B.ID) AND
(A.DateTime>B.DateTime)
GROUP BY A.ID, A.DateTime, A.Details
ORDER BY A.DateTime

Then I requery this to express the elapsed time in hours and minutes.

What would really make this perfect, though, is if the data entry user could
select certain records from which to start ANOTHER elapsed time clock They
could then report not only the elapsed time from the beginning of the case,
but also the intervals subsequent to major events.

I'm thinking the original table could have a NewClock checkbox, and the
database could operate on recordsets with "Yes" in those fields. Am I
heading in the wrong direction?

Much obliged for any advice for anyone who can decipher what I'm after...

Thanks.

Pret
 

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