View Full Version : IIF Statement not working?


mosh
10-28-2009, 03:39 PM
Hi All,

I have a table that contains a questionnaire with 3 possible values for each (Yes/No/N/A).

I am creating a sub-query for each column so i get a value according to the answer given, e.g; if Yes selected, then value of 3.85 given, else 0. I am using the following statement:

Expr1: IIf([tbl_quality_assessments2]![Core_1_Notes]="Yes",1,0)

But it is giving all 0 values when "Yes" is the value in the table. Any ideas?

Thansk,
________
Luv2Playxxx (http://camslivesexy.com/cam/Luv2Playxxx)

ajetrumpet
10-28-2009, 03:43 PM
more than likely, you have a "yes/no" field set, and the values you're looking for are -1 and 0.

-1 = yes, 0 = no....OR -1 = checked box, 0 = unchecked box

mosh
10-29-2009, 01:35 AM
The Fields are set as text with a lookup table containing "Yes", "No", "N/A",
________
blonde girl Webcams (http://www.girlcamfriend.com/webcam/blonde-girls/)

DCrake
10-29-2009, 01:40 AM
If you also list the core 1 notes field in your query do you see different values (Yes, No & N/A)?

Do they all have 0 in the IIF()?

David

mosh
10-29-2009, 03:50 AM
Yes,

When i drop in the value i get the following:

EXPR1: Expr1: IIf([Core_1_Notes]="Yes",1,Null)

Core_1_Notes Expr1
Yes #Error

Yes #Error
Yes #Error
Yes
Yes
Yes

Yes
Yes
Yes
Yes
Yes
Yes
________
Iolite vaporizer colors (http://vaporshop.com/)

mosh
10-30-2009, 06:43 AM
can anyone help?
________
Marijuana Seed (http://marijuanaseeds.org/)

DCrake
10-30-2009, 06:53 AM
Can you send me the table? Or at least a snippet of it?

I could create it myself but it may be something at your end that is doing it. Pre 2007 please.

David

mosh
10-30-2009, 07:10 AM
thanks DCrake,

Ill message you with details.

Regards,
________
CALIFORNIA DISPENSARY (http://california.dispensaries.org/)