I'm not clear which table you are stepping through? ProcessThis? If so, Select processthis before your go top statement and then specify it in the EOF() statement like eof('processthis') as a test also. I also don't see a 'skip' command to go to the next record and I'm not sure why the 'loop' command is there either. Also, I don't know what is in your extra steps you left out inside the loop. Make sure you reselect the processthis table if you work with any other tables in the loop. I would post the rest of the code, because the problem may be there. However, I would recommend a SCAN...ENDSCAN instead. You can also open the data session window to see what table are actually open when you step through the code to test it. If you definitely want a DO WHILE loop, then try something more like:
SELECT ProcessThis
GO TOP
DO WHILE !EOF('ProcessThis')
mProcessA = 0
IF !EMPTY(ProcessThis.ID)
mProcessA = ProcessThis.ID
ENDIF
IF UPPER(ALLTR(ALIAS()))<>"PROCESSTHIS"
SELE ProcessThis
ENDIF
SKIP
ENDDO
Tracy
>Hi All:
>
>I have the following code:
>
>
SELECT <some fields> FROM TableA;
> INTO CURSOR ProcessThis NOFILTER ;
> WHERE TableA.ID = mID
>
> GO top
>
> DO WHILE !EOF()
> * Assign values to variables
> mProcessA = ProcessThis.ID
> mProcessB = ProcessThis.ProcessB
> mProcessC = ProcessThis.ProcessC
>
> Do some more stuff.....
>
> * Reset the variables so they can hold new values
> mProcessA = 0
> mProcessB = 0
> mProcessC = ""
>
> LOOP
> EXIT
> ENDDO
>
>Problem: I get an alias (ProcessThis) not found message after the first iteration of the loop. Where am I going wrong?
>
>Thank you in advance.
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"