sum calculation is not accurate

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
 
R

Ron2006

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
 
P

Philip Herlihy

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
 
J

Jeff Boyce

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.
 

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

Similar Threads


Top