Me & On Mouse Move

B

Brad

Thanks for taking the time to read my question.

I have an On Mouse Move event on a control (label). For testing purposes
right now I have this:
Private Sub R2We1_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
MsgBox Me.Tag
End Sub

That gives me nothing. So I tried this:
Private Sub R2We1_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
'MsgBox Me.Name
End Sub

Which gives me the name of the form. How do I get the name of the control
when I mouse over it? How do I get the name of a control when I double click
on it? Can I use the same method to get the Tag properties of the control?

Thanks,

Brad
 
T

tina

<Me.Tag> refers to the Tag property of the *form*, which is blank unless you
explicitly set its' value. (so is the Tag property of a control, by the
way.)
<Me.Name> refers to the Name property of, again, the form.

to reference a control's properties, you have to specify the control, as

Me!ControlName.Name

or

Me!ControlName.Tag

replace "ControlName" with the correct name of the control.

hth
 
B

Brad

Thanks Tina.

I actually knew that, but for some reason, my brain stopped working. I
guess I had been staring at this db way too long.

Thanks again,

Brad
 
T

tina

you're welcome :)


Brad said:
Thanks Tina.

I actually knew that, but for some reason, my brain stopped working. I
guess I had been staring at this db way too long.

Thanks again,

Brad
 

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