Expression builder problem when calculating a total of fields

joce

Registered User.
Local time
Today, 13:21
Joined
Oct 27, 2011
Messages
43
Hi,

I have tried to enter a text box which will calculate the total of 7 different fields I have each containing a different quantity of animal field. So in my text box I want the total of all the quantities if feed combined together.

The expression at the minute looks as follows ......
(Just so you understand Quantity 1 FW means Quantity of feed 1 in fresh weight, and so on for the rest fo the fields )

=([Quantity 1 FW])+([Quantity 2 FW])+([Quantity 3 FW])+([Quantity 4 FW])+([Quantity 5 FW])+([Quantity 6 FW])+[(Quantity 7 FW])

The total answer it is giving me at the moment doesnt seem to eb adding up the values, but instead just inserting them all together in a line. I also need the result to show in Kg/FW but this also isnt working.

Any help at all would be much appreciated.
 
It sounds like the values are concatenating instead of adding? If so, they are being seen as text rather than numbers. What are the data types of the fields? If they are numeric, then some formula is probably causing them to be seen as text. You can use the appropriate conversion formula to force them back:

CCur([Quantity 1 FW]) + ...

By the way, you likely have a normalization problem with the numbered fields like that. Typically multiple items would be records, not fields.
 

Users who are viewing this thread

Back
Top Bottom