>>SELECT &mcAlias
>>SET ORDER TO
>>SET FILTER TO &mcFilter
>>SET ORDER TO &mcOrder
>>GOTO TOP
>>THISFORM.Grid1.Refresh()
>
>
>John;
>
>I do not like filters and would rather do this with a Select SQL statement, but I do not know all your requirements.
>
>A suggestion:
>
>SET ORDER TO
>SET FILTER TO
>SELECT (mcAlias)
>SET FILTER TO &mcFilter
>locate
if !empty(mcOrder)
>SET ORDER TO tag (mcOrder)
endif
>THISFORM.Grid1.Refresh()
>
>Tom
I would use locate after set filter command for speed. The best suggestion, of course, would be to use SET KEY instead of filter. Honestly, I could not make it work right in one of my application, but may be I didn't try hard enough. Besides, in my case I have only ~1000 records, so perfomance is not a problem.
If it's not broken, fix it until it is.
My Blog