Discussion:
Return name of calling control
(too old to reply)
Rob
2008-03-24 14:04:24 UTC
Permalink
I simply want to return the name of the calling control...

I have a combo box called cboTest

In the after update event I tried...

MsgBox Me.Name

But this returned the Form name, not the control (combo box ) name...

How can I return the combo box name ?
Homer J Simpson
2008-04-03 22:10:58 UTC
Permalink
Post by Rob
I simply want to return the name of the calling control...
I have a combo box called cboTest
In the after update event I tried...
MsgBox Me.Name
But this returned the Form name, not the control (combo box ) name...
How can I return the combo box name ?
Me.cmbMyCombo.Name ?
fredg
2008-04-15 18:24:20 UTC
Permalink
Post by Rob
I simply want to return the name of the calling control...
I have a combo box called cboTest
In the after update event I tried...
MsgBox Me.Name
But this returned the Form name, not the control (combo box ) name...
How can I return the combo box name ?
Since you are writing the code in that combo's AfterUpdate event don't
you already know what the combo's name is.

Anyway...

MsgBox Screen.ActiveControl.Name
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Loading...