Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to GOTO to RECNO() -1
Message
De
03/08/2002 15:31:03
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00685315
Message ID:
00685926
Vues:
57
Hmmm...

I just tested and watched some code just like yours, and it worked, although I did not do in a buffered table with freshly added records. I did it with and without parentheses around .recordsource. Have you watched in the debugger to see what it is going on?

Personally I never use GO or GOTO. I've been burned a few times when the record is no longer available for whatever reason, and then try to access the record using GO, only to have the app return an error. I take the few extra steps, use the LOCATE command and then test if it was successful using FOUND().

I'd be interested to know what you find out when you get to the bottom of this.

Thanks
John



>Hi John
>
>GOTO .nRec2Validate IN ( .RECORDSOURCE )
>changed to
>GO .nRec2Validate IN ( .RECORDSOURCE )
>
>doesn't work any suggesstions on using the same or shall I revert to LOCATE
>
>Thanks for the reply
>
>>Don't use GOTO, Use GO -1 instead, or LOCATE FOR RECNO() = -1.
>>
>>
>>
>>>Deal All
>>>
>>>Yesterday I was working on a view in a grid and the added records returned a RECNO() of -1, -2 etc.
>>>
>>>When I GOTO -1 it gives an error, how do I goto?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform