Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check for empty field
Message
From
11/12/2000 22:57:27
 
 
To
11/12/2000 21:16:30
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00451997
Message ID:
00452024
Views:
18
>>>>>>>>>>>>>>>
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform