View Full Version : Sum a calculated text box


rushy
11-19-2009, 01:33 PM
Hello everyone, i have searched all over and have been trying for hours now and cant get this to work!

i have a textbox in my report with
=IIf([TillMethod]="Cash",[TillAmount]," ") which works fine and when the TillMethod equals cash it shows up with the correct amount in the textbox

However, when i am trying to sum up the total of all the text box's when TillMethod is equal to zero it will not work!

I have tried
=IIf([TillMethod]="Card",Sum([TillAmount]),0)
=Sum(IIf([TillMethod]="Cash",[TillAmount]," "))
But both do not work :(

Thanks in advance for your help!

rushy
11-19-2009, 01:34 PM
DONT WORRY!

haha, i just realised when posting up the code, that something was different!, just tried it out and it works!

For anyone that doesnt know

=Sum(IIf([TillMethod]="Cash",[TillAmount], 0))

Thats all i done!