×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

CAN'T GET MY "IF" STATEMENT TO WORK---HELP

CAN'T GET MY "IF" STATEMENT TO WORK---HELP

CAN'T GET MY "IF" STATEMENT TO WORK---HELP

(OP)
WHENEVER I ENTER THE FOLLOWING IF STATEMENT INTO MY CALCULATED FIELD IT COMES BACK AND SAY I NEED AN IDENTIFIEER.  WHAT DOES THAT MEAN?

=IF([POST WORK QUERY.Earned Hrs]>90,"SENIOR",IF([POST WORK QUERY.Earned Hrs]>60,"JUNIOR",IF( [POST WORK QUERY.Earned Hrs]>30,"SOPHOMORE",IF( [POST WORK QUERY.Earned Hrs]>0,"FRESHMAN","value missing"))))

RE: CAN'T GET MY "IF" STATEMENT TO WORK---HELP


I think you want an 'Immediate If'.

iif(condition,ReturnIfTrue,ReturnIfFalse)

You can nest iif statements inside each other.

You cannot use plain 'if' in a calculated field.

That help?

Tony McGuire
http://www.wjcitycouncil.com
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: CAN'T GET MY "IF" STATEMENT TO WORK---HELP

(OP)
TONY,

THANK YOU FOR YOU REPLY, BUT TODAY I AM UNUSUALLY BRAIN CHALLENGED!  COULD YOU PLEASE SHOW ME WHAT YOU MEAN?

THIS IS MY STATEMENT BELOW - WHERE WOULD I MAKE THE CHANGE?

IF([POST WORK QUERY.Earned Hrs]>90,"SENIOR",IF([POST WORK QUERY.Earned Hrs]>60,"JUNIOR",IF( [POST WORK QUERY.Earned Hrs]>30,"SOPHOMORE",IF( [POST WORK QUERY.Earned Hrs]>0,"FRESHMAN"))))

RE: CAN'T GET MY "IF" STATEMENT TO WORK---HELP

A quick look?

Change 'if' to 'iif'.

I didn't examine it for correct comma placement or correct number of ending parends.  But looks pretty good otherwise.

And you should read the HELP on IIF, so you know what/why.

Tony McGuire
http://www.wjcitycouncil.com
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

RE: CAN'T GET MY "IF" STATEMENT TO WORK---HELP


Maybe I should have been more clear.

Every place you have IF, change it to IIF.

Tony McGuire
http://www.wjcitycouncil.com
"It's not about having enough time; we have the rest of our lives.  It's about priorities."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close