Mouse Down Event

  • Thread starter Thread starter Rachel
  • Start date Start date
R

Rachel

I have numerous controls in the detail section of a form. If I use the Mouse
Down event, is there a way to detect whether the detail section was clicked on
or whether a control was clicked on? And if a control was clicked on, is there a
way to get the control's name. What would be the code?

Thanks!

Rachel
 
Rachel said:
I have numerous controls in the detail section of a form. If I use the Mouse
Down event, is there a way to detect whether the detail section was clicked on
or whether a control was clicked on? And if a control was clicked on, is there a
way to get the control's name. What would be the code?

Me.ActiveControl will be the control object that received
the focus when you click on it. I don't see any reason for
you to use the detail section's mouse events.
 
Rachel,

If your detail section is clicked then the MouseDown event for the detail
section will occur. If a control is clicked, then the MouseDown event for
the control will occur. So, if you put some code in the different MouseDown
events, you should be able to determine whether a control or the detail
section was clicked.

Hope this helps,
 
Back
Top