Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using eof()
Message
De
06/12/2005 09:56:20
 
 
À
06/12/2005 09:43:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01075287
Message ID:
01075297
Vues:
18
>>I have an edit box on a form with several controls. One is to move to the next record(NEXT) and the other is to move to the previous record (PREVIOUS). The code in the next button is as follows:
>>
>>
>>Select cursor
>>
>>If  Eof()
>>	Wait Window "Last Note" Nowait
>>Else
>>	Skip
>>Endif
>>Thisform.Refresh
>>
>>
>>
>>
>>When it get to the eof()it will show the last record and the next time you click the NEXT button the edit box is grayed out. Evidently on the phantom record.
>>
>>Going the other way (previous)and using the same code but using BOF() it stops at the first record no matter how many times you click the PREVIOUS button.
>>
>>How do I get around the blank(gray) edit box. I know it must be something simple but I need to demo this tomorrow and would like to avoid the gray box.
>>
>>
>>Thanks
>>Gaylen
>
>
>Select cursor
>
>If  Eof()
>  skip -1
>	Wait Window "Last Note" Nowait
>Else
>	Skip
>Endif
>Thisform.Refresh
>
>
>
Tore Thanks for response

I tried that at first - Here is what happens - Cursor with 3 records. Clicking the Next button 4 time gets the following:

Record 1 then 2 then 3 then gray(blank) then 3 which is why I didn't use the
skip -1

Gaylen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform