Access Hidden Objects

G

Gavin

I have created a label in msaccess in form design
mode...i want to know how to set it up so that the label
is hidden until the mouse is moved over a certain button
on the form, as the mouse passes over the button, the
label will pop-up...Please Help
 
J

John Webb via AccessMonster.com

Gavin,

To make a label visible upon moving the mouse over a button, you need to
attach a macro or procedure to the MouseMove event of the command button.
For example:



Private Sub Commandbtn1_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)

Me.Label0.Visible = True

End Sub


However, this will not hide the label once you move your mouse away from
the command button. To do this you will need to add a similar event to
either the page header, form header or form detail object - depending upon
where your command button is located.

Lets say your command button is located in the detail section of the form,
the following will work:

Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)

Me.Label0.Visible = False

End Sub


I must stress that this is not an elegant way of dealing with this, and I
would perhaps prompt you re-think whether this is necessary. None the
less, it would work.

Hope this helps

John
 

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