Datasheet view Column Header

Kenln

Registered User.
Local time
Today, 02:23
Joined
Oct 11, 2006
Messages
551
Is there anyway to detect a click on a Column Header in Datasheet view.

I would like to sort based on clicking the column header.

Thank you in advance.
 
Oops, I should also have said...

I turn off the menu bars. I wish to sort via code, which I can do. But I don't know the event, if there is one, that triggers when one clicks on the Column Header.
 
But I don't know the event, if there is one, that triggers when one clicks on the Column Header.
Form_MouseDown is triggered anytime the user clicks anywhere on the form
 
Will this tell me which column header was clicked?
 
Will this tell me which column header was clicked?
it will pass you the coordinates of the click, so technically if you know the column widths, you can extrapolate the column clicked. I was unable (in my admittedly brief search) to find a way to locate the highlighted column in datasheet view.
 
Thanks for your help.

I'll keep looking,
 
I have a solution, are you still looking or did you find an answer?
Cheers
 
In a form in datasheet view, you can place event code. I believe that the column header counts as a label (not going to swear to that). If that is true, you can do an OnClick event with a label. Open the form in datasheet view and switch to design mode. See if you can select the header. If you can, you have a chance. If not, ...
 
twosides,

I'm looking for your solution to this thread. Can you elaborate?

Thanks,
Jeff
 
Twosides, yes definately!

Rockman,
I have a Form that displays in DataSheet. I am turning off the menu bars. I would like to have the user click (or double click) the column header an have that column sort.

Right now I solved it by having the user double click on any record in the field to be sorted. But most people try to double click the header which seems more natural.
 
If you used a continuous form instead of a datasheet, you have all the events in the column label.
 

Users who are viewing this thread

Back
Top Bottom