Mouse Down Event

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
 
M

Marshall Barton

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.
 
P

Peter De Baets

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,
 

Ask a Question

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.

Ask a Question

Top