Hey
Sergey
I think my answer was correct according to Jay's original description of the problem. However as far as I can see he now adds more information which makes it more complicated. Sorry, have to rush...! :-)
>It's not going to work because RECNO() = 1 for empty table/cursor.
>
>>Yeah, that's pretty much what I thought I would have to do... So, I guess the real issue is that RECNO() is NULL if the table is empty? It has no actual value? Hmmm... I could see cases where RECNO() could be -1 though in the case of added records in a buffer. Maybe the best way would be to check if nRecNo is NULL rather than > 0.
>>
>>>Hi Jay
>>>
>>>This modification should do the trick:
>>>
>>>cAlias = ALIAS()
>>>
>>>nRecNo = RECNO()
>>>
>>>Do Something
>>>
>>>SELE (cAlias)
>>>
>>>IF nRecNO>0
>>> GOTO nRecNo
>>>ENDIF
>>>
>>>