Formula Help

J

Jeanette

I have the following expression in my query:
Expr2: IIf([SCHW ADV NETWORK - New]="Yes",[TOTAL FEE]-0)

"SCHW ADV NETWORK - New" can now either be "Yes" or "Yes - New", how do I
add this?
 
T

Tom Ellison

Dear Jeanette:

I would prefer this approach:

Expr2: IIf([SCHW ADV NETWORK - New] IN ("Yes", "Yes -
New"),[TOTAL FEE]-0)

For one thing, if you ever need a third value or want to put the choices in
a table, this syntax is a good starting point. You can add to it readily.

Now, why are you subtracting 0? Or is it actually:

,[TOTAL FEE], 0)

Now that makes more sense.

Tom Ellison
Microsoft Access MVP
 
J

Jeanette

Dear Tom:

Thank you for your help. I was wondering if you could help me with
something else.

I have the following expression:

Expr1: IIf([SCHW ADV NETWORK]=Yes,[TOTAL FEE]*0.15)

But now I need to add that if [SCH ADV NETWORK=Yes New,[TOTAL FEE]-[SAN]

Can this be added to the expression I already have?

Thank you in advance for all of your help!

Jeanette

Tom Ellison said:
Dear Jeanette:

I would prefer this approach:

Expr2: IIf([SCHW ADV NETWORK - New] IN ("Yes", "Yes -
New"),[TOTAL FEE]-0)

For one thing, if you ever need a third value or want to put the choices in
a table, this syntax is a good starting point. You can add to it readily.

Now, why are you subtracting 0? Or is it actually:

,[TOTAL FEE], 0)

Now that makes more sense.

Tom Ellison
Microsoft Access MVP


Jeanette said:
I have the following expression in my query:
Expr2: IIf([SCHW ADV NETWORK - New]="Yes",[TOTAL FEE]-0)

"SCHW ADV NETWORK - New" can now either be "Yes" or "Yes - New", how do I
add this?
 
Top