Because I have never been to VFP school and that is how it was done when I learned coding a couple of centuries ago. :-)
Thank you for the instruction.
>Why do you need a loop?
>
>REPLACE ALL nRank WITH RECNO()
>
>>I have a table and had to add a field to it to hold a record number so the records position would appear in a list box in a report to be developed.
>>
>>I named the field 'rank' and added a bit of code to a prg to loop through the table replacing rank with recno() to fill the field for display.
>>
>>Everytime I run the code an error "variable 'rank' is not found." is presented. When I check the table, the field I added is gone.
>>
>>I restarted my computer and added the rank field to the table again and when the code is run, the same trouble occurs and the field is gone from the table.
>>
>>How can I correct this?
I ain't skeert of nuttin eh?
Yikes! What was that?