L
Lina Manjarres
I have a listview in ms access 2003.
I need to be able to order the columns when I select it, but I get an error
message. This is the code I am using:
Private Sub ListView1_ColumnClick(ByVal ColumnHeader As
MSComctlLib.ColumnHeader)
If Not ListView1.Sorted Then
ListView1.SortOrder = lvwAscending
ListView1.ColumnHeaders.Item(1).Icon = 1
Else
If ListView1.SortOrder = lvwAscending Then
ListView1.SortOrder = lvwDescending
ListView1.ColumnHeaders.Item(1).Icon = 2
Else
ListView1.SortOrder = lvwAscending
ListView1.ColumnHeaders.Item(1).Icon = 1
End If
End If
ListView1.SortKey = ColumnHeader.Index - 1
ListView1.Sorted = True
End Sub
I have one more problem with this. I want to be able to change the data in
one of those cells. How can I do it?
Regards, Lina
I need to be able to order the columns when I select it, but I get an error
message. This is the code I am using:
Private Sub ListView1_ColumnClick(ByVal ColumnHeader As
MSComctlLib.ColumnHeader)
If Not ListView1.Sorted Then
ListView1.SortOrder = lvwAscending
ListView1.ColumnHeaders.Item(1).Icon = 1
Else
If ListView1.SortOrder = lvwAscending Then
ListView1.SortOrder = lvwDescending
ListView1.ColumnHeaders.Item(1).Icon = 2
Else
ListView1.SortOrder = lvwAscending
ListView1.ColumnHeaders.Item(1).Icon = 1
End If
End If
ListView1.SortKey = ColumnHeader.Index - 1
ListView1.Sorted = True
End Sub
I have one more problem with this. I want to be able to change the data in
one of those cells. How can I do it?
Regards, Lina