By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

ListView ColumnClick Event

P: n/a
Hi everyone,

I am trying to sort columns in a listview. When the user clicks on a
column I want to sort on that column. The kicker is, I don't know how
to trap for the column click for the listview. I have looked around
here on Deja, but have not been able to find code that works for me.
Whenever I put the code I will attach below I get the message, "The
expression ColumnClick you entered as the event property setting
produced the following error: Procedure declaration does not match
description of event or procedure having the same name"

I am using Access 2000 if this helps in answering my question.

Any help would be greatly appreciated.

The code I am using is:

Private Sub lstView_ColumnClick(ByVal ColumnHeader As ColumnHeader)
If lcase(ColumnHeader.Text) = "name" Then
lstView.Sorted = True
lstView.SortKey = 0
End If
End Sub

Thanks in advance!
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.