iif statement in the query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I HAVE THE FOLLOWING “QBE†IF STATEMENT THAT IS WORKING

LTD COST: IIf([dbo_PS_DISABILITY_BEN].[BENEFIT_PLAN]="LTD1" Or [dbo_PS_DISABILITY_BEN].[BENEFIT_PLAN]="LTD1A" Or [dbo_PS_DISABILITY_BEN].[BENEFIT_PLAN]="LTD1B",CCur(([ANNUAL_RT]/12/1000)*0.28*10)

HOWEVER, WHAT I WANT IS TO ADD SOMETHING TO THE ABOVE IIF STATEMENT THAT SAYS “IF ANNUAL_RT IS GREATER THAN 400000 THEN USE 400000 IN PLACE OF ANNUAL_RT OTHERWISE IF ANNUAL_RT IS LESS THAN 400000 USE ANNUAL_RT IN THE EXPRESSION. CAN SOMEONE HELP PLUG THAT IN. THANKS AGAIN
 
Try writing without using all caps. Someone might be
inclined to answer
-----Original Message-----
I HAVE THE FOLLOWING â?oQBEâ? IF STATEMENT THAT IS WORKING.

LTD COST: IIf([dbo_PS_DISABILITY_BEN].[BENEFIT_PLAN]
="LTD1" Or [dbo_PS_DISABILITY_BEN].[BENEFIT_PLAN]="LTD1A"
Or [dbo_PS_DISABILITY_BEN].[BENEFIT_PLAN]="LTD1B",CCur
(([ANNUAL_RT]/12/1000)*0.28*10))
HOWEVER, WHAT I WANT IS TO ADD SOMETHING TO THE ABOVE
IIF STATEMENT THAT SAYS â?oIF ANNUAL_RT IS GREATER THAN
400000 THEN USE 400000 IN PLACE OF ANNUAL_RT OTHERWISE IF
ANNUAL_RT IS LESS THAN 400000 USE ANNUAL_RT IN THE
EXPRESSION. CAN SOMEONE HELP PLUG THAT IN. THANKS AGAIN.
 
Sounds as if you need to use another IIF statement inside the existing one.

IIF(dbo_PS... (IIF(Annual_Rt>40000,40000,Annual_Rt)/12/1000)*.28*10))
 
Back
Top