UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Iif Statement In Control Source, Access 2003    
 
   
ghoti
post Aug 2 2020, 05:36 AM
Post#1



Posts: 186
Joined: 29-June 05



On a form I have two controls - Land and Price. I made an IIF statement as follows in control named Cost:

CODE
IIF([Land] = < 0.25, [Price] - 5000,0)
The result is #NAME

I cannot see where the error is.

Can some good soul correct my mistake, please.

Many thanks in advance.
Go to the top of the page
 
cheekybuddha
post Aug 2 2020, 06:33 AM
Post#2


UtterAccess Moderator
Posts: 13,120
Joined: 6-December 03
From: Telegraph Hill


Hi,

If this expression is used as a ContolSource for a control, then it needs to be prefixed with '=' so that it will be evaluated:
CODE
=IIF([Land] = < 0.25, [Price] - 5000,0)


hth,

d

--------------------


Regards,

David Marten
Go to the top of the page
 
ghoti
post Aug 2 2020, 11:57 AM
Post#3



Posts: 186
Joined: 29-June 05



Thank you very much David, that did the trick.
Go to the top of the page
 
cheekybuddha
post Aug 2 2020, 04:54 PM
Post#4


UtterAccess Moderator
Posts: 13,120
Joined: 6-December 03
From: Telegraph Hill


yw.gif

--------------------


Regards,

David Marten
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    6th August 2020 - 04:58 AM