Hyperlink roll over effect on the Access form

  • Thread starter Thread starter alec_yan
  • Start date Start date
A

alec_yan

Guest
Hello,
I have a MS Access form with a few hyperlinks on it. I have tried to achieve effect similar to hyperlink roll over effect on a web page: when mouse pointer goes over a hyperlink it changes colour, etc.
Unfortunately, all I could find was MouseMove event:
Sub Label_MouseMove
Label.ForeColour=vbBlue
End Sub

But in this case hyperlink stays blue even after mouse pointer leaves it. And I would like hyperlink get back it's initial colour.

Thank you
 
Searching the forum is a great way to discover and learn the answers to your Access programming questions.

Store the web address as a text value [in the table] and then use code to change the color of the text field in your form with the mouse move event. Use the Application.FollowHyperlink method to open the web page in the OnClick event of the text box that displays the web link address. Search around for there are plenty examples on how to use the Application.FollowHyperlink method with VBA.
 
Alternatively, you could set up a mousemove event on the area surrounding your control to change the color of the control back once the mouse moves past the boundaries of the control and into the area surrounding it.

Larry
 

Users who are viewing this thread

Back
Top Bottom