C
Can Of Worms
I am looking to sort a subform based on the column of data clicked. In the
past, I have created a separate but nearly identical OnClick event for each
label. In the interest of condensing code, since i have 25 columns, which may
or maynot be shown depending on the SQL string built through code, and I
don't want 25+ more Subs, all nearly identical...
I would like to set the same function as the OnClick event of every label,
and have the name of the label be passed to the function, from which I can
get the column selected through a MID function.
I can get this to work if I use Text Boxes instead of labels (through
..ActiveControl), but then they react like text boxes (surprise!) with the
cursor, highlighting the text, etc..., which I don't like.
I can get it to work with buttons the same way, but buttons have more of an
inner margin than labels, too much for me to realistically work with, and I
can't change the button background color to match the interface.
Labels clicked don't register as an ActiveControl, so I can't use this method.
Anyone know of a way to pick out which label/control was clicked other than
the methods above?
past, I have created a separate but nearly identical OnClick event for each
label. In the interest of condensing code, since i have 25 columns, which may
or maynot be shown depending on the SQL string built through code, and I
don't want 25+ more Subs, all nearly identical...
I would like to set the same function as the OnClick event of every label,
and have the name of the label be passed to the function, from which I can
get the column selected through a MID function.
I can get this to work if I use Text Boxes instead of labels (through
..ActiveControl), but then they react like text boxes (surprise!) with the
cursor, highlighting the text, etc..., which I don't like.
I can get it to work with buttons the same way, but buttons have more of an
inner margin than labels, too much for me to realistically work with, and I
can't change the button background color to match the interface.
Labels clicked don't register as an ActiveControl, so I can't use this method.
Anyone know of a way to pick out which label/control was clicked other than
the methods above?