If val(sys(21))>0 lcDescending = iif(descending(val(sys(21)),'myAlias'), ; ' ASCENDING ',' DESCENDING ') Set order to tag (order('myAlias')) &lcDescending endif