calculations in a query

R

Ruth

Hi there

I am doing a query with calculations and the 2nd set is not working. The
calculations are as follows:

1LoadTime:
DateDiff("h",[starttime],[Finishtime])

This is done for 3 ports -- all the same formula and it works. But then I
do a formula to sum the 3 ports as follows:

TotalTime:
([1LoadTime] + [2LoadTime] + [3LoadTime])


and it doesn't work. There is no error message. It just shows a blank
where a number should be. Please let me know how to make it calculate
properly
 
R

Ruth

Thank-you very much Allen!
--
Thank-you!
Ruth


Allen Browne said:
TotalTime:
Nz([1LoadTime],0) + Nz([2LoadTime],0) + Nz([3LoadTime],0)

For an explanation, see Error #2 in this article:
Common Errors with Null
at:
http://allenbrowne.com/casu-12.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Ruth said:
Hi there

I am doing a query with calculations and the 2nd set is not working. The
calculations are as follows:

1LoadTime:
DateDiff("h",[starttime],[Finishtime])

This is done for 3 ports -- all the same formula and it works. But then I
do a formula to sum the 3 ports as follows:

TotalTime:
([1LoadTime] + [2LoadTime] + [3LoadTime])


and it doesn't work. There is no error message. It just shows a blank
where a number should be. Please let me know how to make it calculate
properly
 
Top