General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only