IIF Statement

TallMan

Registered User.
Local time
Today, 15:54
Joined
Dec 5, 2008
Messages
239
Hello,

Is there a way to not have the "False" part of the IIF statement not populate in a query?

For instance I want all new accounts with yesterdays daye to populate and if it is not yesterdays date I do not want to see it.


Thanks Guys!
 
I may be missing something but couldn't you just use that expression and abandon the whole iif():

pseudo: = yesterdays date

???
 
If I put null then I receive every row of accounts that the open date was not yesterday.
 
I think a switch statement is like an IIF statement without the false end
 
Chris,

What is the function for a switch statement?

Do you have any links that could instruct me on this?
 
Well an IIF is made up of

=IIF(Expression, true, false)

Switch is just simply

=Switch (expression, variable)

I find switch particularly useful if many instances are involved, e.g.

=switch([sky]="clear","blue",[sky]="night","black")
(for example, off the top of my head)


It's laid out exactly like your iff statment, except you remove the last "false" statement - and swap "IIF" with "switch"
 

Users who are viewing this thread

Back
Top Bottom