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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top