Sum Returns / Causes #Error

R

Reg Besseling

Hi all im at my wits end and need some help

when i put this into a unbound text box it causes a #Error


=Sum([DecBud]*[DecPerc]/100)

if i change to =Sum([DecBud]*[DecPerc]) #Error

if i change to sum(100) #error

if i change it to =Sum([DecBud]) it is fine

if i change it to =Sum([DecPerc]) it is fine

=Sum([DecBud])/100 is fine

=Sum([DecBud]/100) #Error

i have made sure all the names and control sources are different
 
S

SusanV

Your asking it to add the result of an equation in the first one, in the
second one you want it to add a single digit - same problem. Ask yourself -
what is 1 +.... ? How can you answer without the second digit? The remaining
ones work because you are asking it to sum a GROUP of digits - all values
contained in the field DecBud, or each value of DecBud divided by 100.

If you want to use the equation, drop the Sum: =[DecBud]*[DecPerc]/100
 
R

Reg Besseling

this does not explain why =Sum([DecBud]) works
but =Sum([DecBud]*[DecPerc]) does not work in the form detail and footer
sections


SusanV said:
Your asking it to add the result of an equation in the first one, in the
second one you want it to add a single digit - same problem. Ask
yourself - what is 1 +.... ? How can you answer without the second digit?
The remaining ones work because you are asking it to sum a GROUP of
digits - all values contained in the field DecBud, or each value of DecBud
divided by 100.

If you want to use the equation, drop the Sum: =[DecBud]*[DecPerc]/100
--
hth,
SusanV

Reg Besseling said:
Hi all im at my wits end and need some help

when i put this into a unbound text box it causes a #Error


=Sum([DecBud]*[DecPerc]/100)

if i change to =Sum([DecBud]*[DecPerc]) #Error

if i change to sum(100) #error

if i change it to =Sum([DecBud]) it is fine

if i change it to =Sum([DecPerc]) it is fine

=Sum([DecBud])/100 is fine
=Sum([DecBud]/100) #Error

i have made sure all the names and control sources are different
 
Top