Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty record for simple NEXT click method
Message
From
03/03/2003 06:24:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
03/03/2003 01:12:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00760254
Message ID:
00760285
Views:
21
>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform