Mouseover Text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I get the text in a textbox to change colour when I pass my mouse over
it. I am using MS Access 2000 and I have limited coding knowledge.

Typically, I need some white text to change to yellow.
 
Hi Andrew,

TAke a look at the MouseMove event for the control. You can use this event
to determine when the mouse is moving over one particular control. To
determine when the mouse is no longer moving over the control you need to
use the MouseMove event of the Detail section of the form. The following
code will change the forecolor of a text box to red when the mouse moves
over the textbox . The second event procedure returns the forecolor of the
control to black.



Private Sub Text0_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Me.Text0.ForeColor = vbRed
End Sub

Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Me.Text0.ForeColor = vbblack
End Sub
 
Back
Top