Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"IF, THEN" not returning "ELSE"

Status
Not open for further replies.

arachnoid

Programmer
Jun 14, 2002
108
US
I have the following formula...

If {F4006.OAANTY} = '2' then "Y" else "N"

However, it is not returning the else function of the formula. I know this is a very simply formula, but I cannot figure out why it is returning the Y's but not the N's...

Whatever the issue is, it is throughout all of my if, then, else statements as I have 4 and none of them are returning the else function...

Any insight will be greatly appreciated.
 
Not knowing where this formula is being used, I would suggest that you place the field alongside the formula to verify that it is returning bad data, I suspect that it isn't.

Try:

if isnull({F4006.OAANTY}) or {F4006.OAANTY} <> &quot;2&quot; then
&quot;N&quot;
else
&quot;Y&quot;

-k
 
Thanks Synapse!

I had just figured out what was going on when your response came in.

I am left joined to another file and I was not getting my &quot;else&quot; due to the fact that is was a null value.

Sometimes, I wish I would think before I post.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top