General information
Category:
Coding, syntax & commands
>IIF (THISFORM.text18.VALUE <0,THISFORM.text18.FORECOLOR=RGB(255,0,0) , THISFORM.text18.FORECOLOR=RGB(0,0,0))
What your code is doing is evaluating if the current forecolor equals read, and then returning the logical value to nothing. IIF() evaluates and returns the 2nd and 3rd parameters, it doesn't execute them.
So, what you want is this:
THISFORM.text18.FORECOLOR = IIF (THISFORM.text18.VALUE <0, RGB(255,0,0) ,RGB(0,0,0))
BTW, the space after the IIF doesn't make a difference.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only