If you use a Date/Time field to store a duration, the math may not work as
you expect. Explanation below.
You could show the total time in minutes with a text box in the Form Footer
(or Report Footer) bound to this expression:
=DateDiff("n", Sum([FlightTime]), #0:00:00#)
For details on converting that to minutes see:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html
Or, if you do not need to perform any further math on the total, you could
use this custom DateDiff replacement:
http://www.accessmvp.com/djsteele/Diff2Dates.html
As to why it works like that, Access stores date time values as the number
of days since Dec 30, 1899. Consequently, if it wraps past 24 hours, it will
show the result as Dec 31, 1899 plus the time. And if you have suppressed
the date (e.g. by formatting as short time), all you see is the remainder.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Nigel Heald" <ni***@mrauk.co.ukwrote in message
news:12*************@corp.supernews.com...
>
We have a form that records flight times in hours and minutes, for example
a
1 hour 15 minute flight is recorded as 1:15 Does anyone know how to get
Access 2003 to calculate a total figure for a number of flight times
recorded in a datasheet form? and is there a way to display flight times
greater than 24 hours i.e 26:20 for example? The only solution i can find
is
to use decimal times i.e 1.25 instead of 1:15 which is our least preferred
solution.