problem with IF in the field statement

T

Tony

I have created form which part is a table with several
rows for which I need to calculate the totals. I do not
want to display total equal 0.
My first question is what is the right syntax for the IF
statement to use. I am trying:

{IF{=SUM(LEFT)}>0 {=SUM(LEFT)} ""}

but it is not working.

Any suggestions ?

Tony
 
T

Tony

I have modified the IF statement to:

{IF{=SUM(b1:d1)}<>"0" {=SUM(b1:d1)} ""}

and all is working just fine now.

Tony
 
G

Greg Maxey

Tony,

Are you getting "error unknow op code for conditional/"
{IF{=SUM(LEFT)} > 0 {=SUM(LEFT)} ""}

Without the spaces I added before and after the > I get
that error. Otherwise it works fine.
 
J

Jay Freedman

Hi, Tony,

The syntax is correct, but IF and Formula fields can be finicky about
spaces. Put a space before and after the > sign, and it should start
to work.
 
M

macropod

Hi Tony,

You can also do this WITHOUT an IF statement:
{=SUM(LEFT) \# 0;-0;}
This uses a numeric picture switch to get the same result - the last ';'
specifies the zero format (in this case, nothing)

Cheers
 

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