sum calculation is not accurate

  • Thread starter Thread starter David
  • Start date Start date
D

David

Hi, I'm trying to sum two fields (Time In, and Time Out) in a report.
My code in the Control Source is: =Sum([Time Out]-[Time In]). It
works
ok unless the records get to be around a hundred or more, then the
total becomes much smaller than it should be. Is there a reason it
works on a small amount of records, but not a large amount? Thanks
for
any help you might be able to give me. David
 
What are the properties/definition of the Sum Field?

It would probably be best to compute the difference between the times
as minutes and then to sum that. If you then wanted to show it in
hours you can do that as a separate step.


Ron
 
David said:
Hi, I'm trying to sum two fields (Time In, and Time Out) in a report.
My code in the Control Source is: =Sum([Time Out]-[Time In]). It
works
ok unless the records get to be around a hundred or more, then the
total becomes much smaller than it should be. Is there a reason it
works on a small amount of records, but not a large amount? Thanks
for
any help you might be able to give me. David

Dates/times are (normally!) stored as numbers with integer (dates) and
fractional (times) parts. To manipulate them, you need to use the Date/Time
functions provided (e.g. DateDiff). See:
http://office.microsoft.com/en-us/access-help/on-time-and-how-much-has-elapsed-HA001110218.aspx

HTH

Phil, London
 
Already posted (and replied to) in another newsgroup...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Back
Top