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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help With Syntax for Multiple If Criteria/Statements

Status
Not open for further replies.

Ezyflo

Technical User
Aug 12, 2002
26
0
0
US
I have a look up field for "benefit group" in my table where they their are about 6 choices.

Of the 6, 3 groups have the same vacation schedule. I am trying to write an if statement for their vacation time.

if benefit group = Local 49 or Dispatcher or Police Officer
and
Status = FT
and
FlexPlan=false
and
Years employed is between 0 and 5 then vac =80

Same criteria for benefit group, status, and flex plan with
Years employed changing.

Not sure how to write this. Any help would greatly be appreciated.

Thanks.

 
Are you doing this in a query? You can use embedded iif() statements to accomplish this.

iif(criteria, truepart, falsepart)

so each succesive iif() statement would go in the falsepart of the statement above it

vac:iif(([benefit group] = "Local 49") or ([benefit group] = "Dispatcher") or ([benefit group] = "Police Officer"))
and (Status = FT) and (FlexPlan=false) and (([Years employed] >= 0) and (Years employed <= 5),80, iif(([benefit group] = &quot;Local 49&quot;) or ([benefit group] = &quot;Dispatcher&quot;) or ([benefit group] = &quot;Police Officer&quot;)) and (Status = FT) and (FlexPlan=false) and (([Years employed] >= 6) and (Years employed <= 10),120, put next iif() statement here ))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top