SELECT 1 USE aliq m.no=no m.nam=nam DO WHILE .t. and no=m.no skip IF m.no<>no m.no=no IF EOF() EXIT ENDIF endif enddoTry this, I simplified your code and changed the memory variable name, except for that it should do exactly the same:
SELECT 0 && Always select 0 to let VFP find a free work area!!! Or SELECT an alias by name USE aliq m.lno=no SCAN FOR no=lno IF lno#no lno=no && this line will throw you out of your loop, but is that what you want to do? ENDIF ENDSCANTo get the code easier to read at UT, you can add "< pre >" before your code, and and "< /pre> " after. Remove the spaces, I must enter them here or UT will translate my formatting code.
>SELECT 1 >USE aliq >m.no=no >m.nam=nam >DO WHILE .t. and no=m.no >skip > >IF m.no<>no > m.no=no > >IF EOF() >EXIT >ENDIF >endif >enddo > >>thanks