Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Empty record for simple NEXT click method
Message
De
03/03/2003 06:24:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
03/03/2003 01:12:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00760254
Message ID:
00760285
Vues:
20
>i have this click method in my button cmdNext.
>
>IF !EOF()
>SKIP
>ELSE
>GO BOTTOM
>ENDIF
>Thisform.Refresh()
>
>why does foxpro shows an empty record when NEXT button encounters EOF()? i checked my table and there is no empty record.
>
>any help pls?

EOF() returns .T. if you are AFTER the last record. If you have 10 records, recno() would return 11 when this happens.

I found no alternative other than checking for EOF() both before and after the SKIP, as Jos explained. Before, to avoid error messages; after, to avoid being after the last record.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform