how to Total a calulated field

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
 
A

Allen Browne

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])
 
S

Steve Hall

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


.
 

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

Top