Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check for empty field
Message
De
11/12/2000 22:57:27
 
 
À
11/12/2000 21:16:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00451997
Message ID:
00452024
Vues:
19
>>>>>>>>>>>>>>>
>In a form, I have the formula to check a field X of a table --- if X = "" ...
>It works fine when I run the form in VFP. But it has wrong operant error after I complie it to an exe file.
>Finally I change it to if empty(X) ... then it works fine in both VFP and in its exe file. Does it mean we should use the empty() instead of = "" if we want to check empty field?
>>>>>>>>>>>>>>>

empty(X) works for different types of values, numeric, character, logical.
So X = 0 and empty(X) are the same. But if you test IF X = "" like in your example when it's numeric it will give you the error.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform