Can someone please point me in the right direction with this.
I'm using access 2000 and I've placed a listview AcitveX control on a
form. I'm populating the list from a query but after it has loaded I
would like the user to have the option to sort by any column they wish.
The data loads fine but the ColumnClick event has some knock on effects.
I've tried to use the following example:
Private Sub ListView1_ColumnClick(ByRef ColumnHeader As ColumnHeader)
' When a ColumnHeader object is clicked, the ListView control is
' sorted by the subitems of that column.
' Set the SortKey to the Index of the ColumnHeader - 1
ListView1.SortKey = ColumnHeader.Index - 1
' Set Sorted to True to sort the list.
ListView1.Sorted = True
End Sub
can be found at:
http://msdn.microsoft.com/library/de.../en-us/cmctl19
8/html/vbprosortorderx.asp
This doesn't work as there seems to be a conflict of events.
When the form loads I get a "The expression On load you entered as the
event property setting produced the following error: Procedure
declaration does not match the description of event having the same
name"
I then get the same error but for a Mouse move event and again for a Key
Down even.
I don't know whats going on here because I don't have any of those
events set up.
I've included all the references stated in the microsoft example above.
Any ideas?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!