VERY Simple Compound IIF

  • Thread starter Send Object Command - Two attachments
  • Start date
S

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....
 
D

Duane Hookom

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

Send Object Command - Two attachments

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....
 
Top