>IF thisform.opgSortDirection.option1.Value = 1 &&Ascending > SELECT * ; > FROM curBrowseModal ; > ORDER BY cSortSeqASC ASC ; > INTO CURSOR curBrowseModal >ELSE > SELECT * ; > FROM curBrowseModal ; > ORDER BY cSortSeqDSC DESC ; > INTO CURSOR curBrowseModal >ENDIF >>
>IF thisform.opgSortDirection.option1.Value = 1 &&Ascending > SELECT * ; > FROM curBrowseModal ; > ORDER BY cSortSeqASC ASC ; > INTO CURSOR curBrowseModalS >ELSE > SELECT * ; > FROM curBrowseModal ; > ORDER BY cSortSeqDSC DESC ; > INTO CURSOR curBrowseModalS >ENDIF >>
thisform.Grid1.ControlSource = "" IF thisform.opgSortDirection.option1.Value = 1 &&Ascending SELECT * ; FROM curBrowseModal ; ORDER BY cSortSeqASC ASC ; INTO CURSOR curBrowseModalS ELSE SELECT * ; FROM curBrowseModal ; ORDER BY cSortSeqDSC DESC ; INTO CURSOR curBrowseModalS ENDIF thisform.Grid1.ControlSource = "curBrowseModalS" thisform.Grid1.Refresh()But I prefer to create and use an index and change the order on the fly