how to Total a calulated field

  • Thread starter Thread starter Steve Hall
  • Start date Start date
S

Steve Hall

Hi

I have a field in a query that is calulated using the
expression Expr1: Format([Time On]-1-[Time Off],"Short
Time", I now need to find the sum of these times, as
these are part of a one to many realationship so i can
end up with a few times.
I have tried sum([Expr1]) but get a error message

Thanks in advance

Steve
 
The Format() expression returns a string, which cannot be summed.

Consider returning a result in minutes, so you can sum and interpret the
value:
Expr1: DateDiff("n", [Time On], [Time Off])
 
Thanks Allen thats given me something to work with

Thanks again Steve
-----Original Message-----
The Format() expression returns a string, which cannot be summed.

Consider returning a result in minutes, so you can sum and interpret the
value:
Expr1: DateDiff("n", [Time On], [Time Off])

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


Hi

I have a field in a query that is calulated using the
expression Expr1: Format([Time On]-1-[Time Off],"Short
Time", I now need to find the sum of these times, as
these are part of a one to many realationship so i can
end up with a few times.
I have tried sum([Expr1]) but get a error message

Thanks in advance

Steve


.
 
Back
Top