Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why isn't this IIF expression working?
Message
De
17/08/2000 10:42:42
 
 
À
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:
00406090
Vues:
25
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform