I am using the Shortcut Menu Bar property of many combobox controls to
execute a single shared custom function.
When the function executes, I need it to immediately identify the
following items:
MainFormName, SubFormControlName (if this is a subform), and the
ComboBox Control Name that launched the event.
The following code seems to work, but I have my doubt. I am
particulary concerned about the subForm control identity. If the
function is launched from the Mainform instead of a subform, then
Line2 just displays the combobox control on the mainform, since no
subform control exists from that perspective.
So, assuming the code below is approaching this whole thing properly,
I would probably identify a subform when the controlnames for the last
two lines of code differ?
1-MsgBox Screen.ActiveForm.Name 'MainForm Name
2-MsgBox Screen.ActiveForm.ActiveControl.Name 'SubForm Control Name
3-MsgBox Screen.ActiveControl.Name 'Active Control name
Am I on the pursuing the properly ???
Thanks
Greg