I'm building a form that has a large number of label controls that have the same code in the OnClick and OnDblClick events. The generic form of the code is like this:
I would like to not hard-code the control name in the function argument; I would still obviously need to call the procedure in each control's click event, but I could just cut-and-paste the code without having to change the argument. If it was a textbox control, I would declare a control variable and set it to Screen.ActiveControl. But this doesn't seem to work with labels. Is there a method or property by which to refer to a clicked label? Thanks!
Ken S.
Code:
Private Sub lbl1_Click()
Call SomeFunction(Me!lbl1)
End Sub
Ken S.