Mouseover Text

A

Andrew Wilkins

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

Sandra Daigle

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
 

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