How do I get a listview in report view to sort in ascending or descending order by the column that is clicked. I tried:
but that sorts by the first column no matter which column you click on. Do I have to rearrange the column indexes whenever a column is clicked or what?Code:Private Sub Listview_ColumnClick() With Listview If (.SortOrder = lvwAscending) Then .SortOrder = lvwDescending Elseif (.SortOrder = lvwDescending) Then .SortOrder = lvwAscending Endif End With End Sub




Reply With Quote