>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