>Try with
>
>...
>ORDER BY 1
>
Yep, that does it. I had tried that already today, with no luck...But, when you suggested it, I went back and tried some more things:
You see, the case is tricky because I must eval it since the user may have chosen to sort by another column. There are actually more columns than what I showed in my example code. I just posted a simpler version to make it easy to see the problem.
It's pretty much all eval'd. (See code below.)
Any way, when I tried earlier, I had set the Form property that controls this to '1', which did not work, but I finally realized that I had to enter ='1' into the Property Sheet, then it started working!
Here is the actual code, where you can see all the evals:
Select * From &lcTemplate where 1=2 Into cursor &lcDiskFile;
Union All;
Select &lcCopyFlds;
From &lcChildAlias with (BUFFERING=.T.);
Where &lcCriteria;
Order By &lcChildOrderField