Dim v As Object
Set v = Screen.ActiveControl
Debug.Print v.Name, v.Parent.Name
Debug.Print Screen.ActiveForm.Name, Screen.ActiveForm.Caption
Beyond that it is hard to say since you didn't say where you wanted to run
the code. In a form event you can get the form name with Me.Name and the
current control with Me.ActiveControl.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.