Iif (1 Viewer)

cruzpatas

Registered User.
Local time
Today, 09:52
Joined
Dec 16, 2005
Messages
41
I have a unbound text that I want to update to 20 when a field onte hform is >6 but = 0 when the field is <=6. Here is my IIF statement in the control source: IIF([Pitch]>6 OR [Pitch]<=6,"20","0"). No matter what Pitch equals the box keeps updating to 20. Why??:confused:
 

Brianwarnock

Retired
Local time
Today, 15:52
Joined
Jun 2, 2003
Messages
12,701
IIF([Pitch]>6,20,0)

You have 2 conditions in the criteria that cover all values, the " round the values will make them text ,is that intentional?

Brian
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 07:52
Joined
Aug 30, 2003
Messages
36,133
Your test is basically "if pitch is greater than 6 or less than or equal to 6 then..." Any value will meet that test. Try

IIF([Pitch]>6,"20","0")
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 07:52
Joined
Aug 30, 2003
Messages
36,133
Dang slow fingers! :p
 

cruzpatas

Registered User.
Local time
Today, 09:52
Joined
Dec 16, 2005
Messages
41
Great Job!!! I was a little off there with what I was trying to do. I seem to have mad a simple thing very complicated. :D
 

Users who are viewing this thread

Top Bottom