Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why isn't this IIF expression working?
Message
 
 
À
17/08/2000 08:13:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00406009
Message ID:
00406017
Vues:
38
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform