Is there any way to refer to the properties (eg .Name) of a control inside the code for an event of that control?
For example, in the OnClick event of a label:
Where <label> is something like ActiveControl (which doesn't work in my situation).
I'm trying to write re-usable code where I don't have to specify "lblDept", or whatever the name of the label is.
You'd think that Access would know what Control the event is in, but I haven't been able to find a way to reference it.
-------------------
Rob Foye
Database Management
Regions Bank
For example, in the OnClick event of a label:
Code:
Private Sub lblDept_Click()
Dim stName As String
stName = <label>.Name
Debug.Print stName
End Sub
I'm trying to write re-usable code where I don't have to specify "lblDept", or whatever the name of the label is.
You'd think that Access would know what Control the event is in, but I haven't been able to find a way to reference it.
-------------------
Rob Foye
Database Management
Regions Bank