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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF Syntax error 2

Status
Not open for further replies.

acct98

IS-IT--Management
Aug 15, 2002
194
0
0
US
Can someone tell me what's wrong with the syntax error below?


x
21% =IF(x >1 or <.85,&quot;yes&quot;,&quot;now&quot;)
 
Try that function -- I dont think it will work because of the &quot;or&quot;.
 
Sorry, didn't notice the or.

IIF(x >1,&quot;yes&quot;,iif(x<.85)&quot;yes&quot;,&quot;now&quot;))

----------------------------------------
Ben O'Hara
----------------------------------------
 
Ben,

Unfortunately that did not work either.
 
Where are you putting this statement? Query or VBA? If in a query you do need two I's in the IF. And you can have Or statements in either place as far as I know.

Jessica Morgan
Fire Fighter Sales & Service Co.
 
I think you need:

21% =iIF((x > 1 or x < .85),&quot;yes&quot;,&quot;now&quot;)

Bev
 
Thanks Bev.

I tried the if and syntax in excel and got it to work but it would not work in Access. Anyway thanks you suggestion worked perfect.
 
Bugger, I missed out a comma!
IIF(x >1,&quot;yes&quot;,iif(x<.85),&quot;yes&quot;,&quot;now&quot;)) would work, but so does Bevs!

B ----------------------------------------
Ben O'Hara
----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top