get current object name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

what returns the current object/control name on a form?

I need to make a function call that requires the calling object name - I'd
rather make the call genertic instead of hard coding for each of the forms
controls
 
Try

Screen.ActiveControl

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
what returns the current object/control name on a form?

I need to make a function call that requires the calling object name - I'd
rather make the call genertic instead of hard coding for each of the forms
controls
MsgBox Me.ActiveControl.Name
.... or ...
MsgBox Screen.ActiveControl.Name

Also look up
MsgBox Screen.PreviousControl.Name
(in case you are clicking a command button and want the previous
control's name) in VBA help.
 
Back
Top