Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement