Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IF Statement Doesn't Seem to be Working
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00123956
Message ID:
00124659
Vues:
17
>IF Statement Doesn't Seem to be Working
>
>I have numeric fields in a table of employee absence data as follows ...
>
>Abs.late
>Abs.absent
>Abs.early
>
>I have written an error-checking IF statement that doesn't seem to be working, but yet, VFP does not generate an error on it either.
>
>
>IF Abs.late=0 AND Abs.absent=0 AND Abs.early=0
>     MESSAGEBOX('You need to make a non-zero entry') + CHR(13) + ;
>          'in either Late:, Absent:, or Early:', 0+48+0, 'Error')
>
>
>Even if the fields Late, Absent, & Early contain zeros (0.00), this MESSAGEBOX never gets processed, the program just goes right on as if everything is fine.
>
>Need help. TIA, CH.

Chuck, Someone else may have suggested this (it's a long thread, and I've missed a couple of days) but are you working with data just input into a form? If so, you should be working with your Thisform.txtLate.value instead of abs.Late unless you are certain you have all the data in the buffer or saved to disk.

Follow the code with Debug to check the values just before the messagebox is called.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform