OnMouseOver for button on continuous form

  • Thread starter Thread starter Sietske
  • Start date Start date
S

Sietske

How to make an OnMouseOver event for a button on a continuous form?

1. Is it possible?
2. Is it possible in Access 2003?
3. Can somebody give me a hint on how to do it, so that I can keep going?
 
In Access it's called MouseMove rather than MouseOver. You can do this, of
course, but exactly what are you trying to do with it? On a Continuous form,
if the button's in the header or footer it's pretty straight forward, but if
you have a button on each row MouseMove for one button will affect all of
these buttons!

This is usually used to do things like formatting colors, boldness, etc when
the mousing over a control, or displaying an help popup. The trick is not
just causing the action when the control is rolled over, but also "re-
setting" things when the mouse leaves the control. You do this re-setting by
also using the MouseMove event of the underlying section of the form. This
code changes text color from black to red then back again to black as the
mouse moves over then off of a button, where the button resides on the
FormHeader section of the form:

Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Command1.ForeColor = vbRed
End Sub

Private Sub FormHeader_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Command1.ForeColor = vbBlack
End Sub

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
 
Thanks for your hints! Unfortionately, I have the button on each row, so
MouseMove seems to be not so useful after all. Luckily there are more ways to
skin a cat, so I've found another solution in the meantime. But thanks
anyway! :-)
 

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

Back
Top