Just a thought but do all of the columns you are trying to sort on have validdata? You may run into problems if there are nulls or odd characters.