Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why isn't this IIF expression working?
Message
 
 
To
17/08/2000 08:13:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00406009
Message ID:
00406017
Views:
37
>THISFORM.text18.VALUE=(var1+var2)-THISFORM.text17.VALUE
>
>IIF (THISFORM.text18.VALUE <0,THISFORM.text18.FORECOLOR=RGB(255,0,0) , THISFORM.text18.FORECOLOR=RGB(0,0,0))
>
>I want the font show in red if the value is negative
>
>Thanks in advance
>
>Ulises

Is it just a typo here that you have a space between IIF and the left paren? Anyway, instead of spending too much time fituring this out, you could just as easily break this down:
with THISFORM.text18
   IF .VALUE < 0
      .FORECOLOR = RGB(255,0,0)
   ELSE
      .FORECOLOR = RGB(0,0,0)
   ENDIF
endwith
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform