Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF - AND????

Status
Not open for further replies.

Freckles

Technical User
May 1, 2000
138
US
Please, I need the format for a "if/and" statement that give me the following in a query field for Access 97.

IIf (([calculated field A] = 100) and ([Calculated Field B] = 40),"YES","NO") ::) Deb Koplen
deb.koplen@verizon.com

A person can stand almost anything except a succession of ordinary days.
 
Your statement is fine, what's it doing? Joe Miller
joe.miller@flotech.net
 
Thanks so much for being quick

Exact Statement:

Color:iif (([SPEC_JW_State Blips 1].[VAR from Average])<-100 AND (([SPEC_JW_State Blips 1].[% VAR from Average])<-0.3,&quot;OK&quot;,&quot;NO&quot;))

As far as I can tell, all of my parenthesis (sp) are paired. I get a statement that I entered an invalid comma or missing a quotation mark.

Also, on a report based on this query, at &quot;on format&quot;, I need to tell the back color to change if the field is &quot;OK&quot;

Remember I am using Access 97 ::) Deb Koplen
deb.koplen@verizon.com

A person can stand almost anything except a succession of ordinary days.
 
You have an extra parenthesis before the second table name, it's highlighted here:

Color:iif (([SPEC_JW_State Blips 1].[VAR from Average])<-100 AND (([SPEC_JW_State Blips 1].[% VAR from Average])<-0.3,&quot;OK&quot;,&quot;NO&quot;))
Joe Miller
joe.miller@flotech.net
 
Also, what does the &quot;<-&quot; signs do? Should they be &quot;<=&quot;? Terry M. Hoey
 
THANKS -- four eyes are better than two. And your question about &quot;<-&quot; made me think. It means &quot;less than a negative number. But a better way to state it is &quot;between&quot;. I shall work on that

THAnks AGAin

Nest solving the Back Color problem ::) Deb Koplen
deb.koplen@verizon.com

A person can stand almost anything except a succession of ordinary days.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top