IIf and showing all

5 pts.
Tags:
IIF function
IIF statement
I want to show in my criteria that: IIf([Issues].[DataOrigin]=2,-1,( no criteria or (0 or -1)) If I use null instead of no criteria my result is wrong if I use (0 Or _1) in Iff function my result is same as -1 but when I use (0 Or -1) in query I have right answer. Anyway I would like to show IIf([Issues].[DataOrigin]=2,-1,(every thing)) Please if you can help me. Hengameh

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi Hh1354

You’ve failed to tell us what environment you’re working in.
Is this a query in Access or what???

IIf([Issues].[DataOrigin]=2,-1,0)

Not sure what you want – this would return a -1 if DataOrigin = 2 and a 0 if not

IIf([Issues].[DataOrigin]=2,”Nothing”, “Everything”)

This would return the words Nothing if true or Everything if false.

The type of both return values must be the same.

Wish I could help you more but you haven’t been very clear in your request.

Phil

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following