>Hi Brian,
>
>Yes, that's what I intended to do. I just changed to program code, and it works. This is what I have now:
>
>select DispChek
>set order to dispchek
>do while .t.
> if seek(lcDispatchNumber+DspCkItm.driver+lcdrvnum,'Dispchek','dispchek')
> scatter memvar blank
> gather memvar
> else
> exit
> endif
>enddo
>
>
>
>This works! It replaced:
>
>select DispChek
>set order to dispchek
>do while .t.
> seek lcDispatchNumber+DspCkItm.driver+lcdrvnum
> if .not. found()
> exit
> endif
> scatter memvar blank
> gather memvar
>enddo
>
>Which didn't work. I stepped through the code in debug and verified that the record found was not correct, but the program proceeded as if it was.
>
>Larry
Larry;
Another flavor to get rid of the Do While
select DispChek
set order to dispchek
seek(lcDispatchNumber+DspCkItm.driver+lcdrvnum,'Dispchek','dispchek')
If Found()
scatter memvar blank
gather memvar
Else
Enddo
Tom