473,509 Members | 3,095 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListView_ColumnClick

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!
Nov 12 '05 #1
0 1467

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1729
by: rmorvay | last post by:
I have successfully integrated sorting in the listview control with the following code: Private Sub ListView_ColumnClick(ByVal sender As Object, ByVal e As...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.