VERY Simple Compound IIF

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

Guest

Here's my question...
I want to create an IIF statement that results in the following:
If Type = S1 or G2, then Value *-1, if not, then Value.
So, if the type is either S1 or G2, Value should be multiplied by -1, else,
value.

Can't get anymore simple than this....
 
Assuming you are creating a new column in a query:
NewColumn: [value] * IIf([Type] = "S1" or [Type] = "G2", -1,1)
 
Works like a charm - thanks!!

Duane Hookom said:
Assuming you are creating a new column in a query:
NewColumn: [value] * IIf([Type] = "S1" or [Type] = "G2", -1,1)

--
Duane Hookom
MS Access MVP

"Send Object Command - Two attachments"
Here's my question...
I want to create an IIF statement that results in the following:
If Type = S1 or G2, then Value *-1, if not, then Value.
So, if the type is either S1 or G2, Value should be multiplied by -1,
else,
value.

Can't get anymore simple than this....
 
Back
Top