message on mouse move

hmho

Registered User.
Local time
Today, 01:51
Joined
Apr 7, 2009
Messages
93
Is it possible to to have comment pop up when mouse is placed at top of field on form same way as comments on excel.

Thanks
 
hmho,

Yes, you can have a message displayed for almost any control. Just use the "ControlTip Text" Property of each control. Just enter the text you want to appear when the user places the mouse over that control. You can set this and other properties for each control by selecting the desired control while you form is in design mode and with the control selected, press the F4 key to display the "Properties" dialog box. The "ControlTip Text" property is on the "Other" tab near the bottom.

HTH
 
You also posted this on another forum with a similar response.

You could use the GOT Focus of the field and then display a message box.
 
Actually it was posted on two other forums! The normal way of doing this is to make the label invisible using the MouseMove event for the Section of the form the original control lies on. Here's code for a control on the Detail Section

Code:
Private Sub ClientName_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
   lblClientNameHelp.Visible = True
End Sub

Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
   lblClientNameHelp.Visible = False
End Sub
I prefer this approach as Control Tip Text is often erratic, and a label can be formatted for a nicer appearance.
 
Missinglinq,

If you use the code you posted where do i post the message?

Thanks
 
You create a label (in the code above, lblClientNameHelp) and place the message in the label. Then use the code above to make the labe appear or disappear.
 
Nice one missinglinq.

I've have never liked the erratic nature of the ControlTipText.
I have some forms where, for reasons unknown, ToolTips will not appear until the focus has moved to the control.

However your technique would mean that events are triggered virtually continuously whenever the form is in use. I suppose this doesn't really matter.

Pity that Microsoft doesn't provide a better ToolTip facility in Access.
 
Missinglinq,

Thanks for your reply but I'm not sure how to place the label can you explain to me please.

Thanks
 
  1. Go into Form Design View
  2. Place a label on the form
  3. Enter your text and format the label, if you want to
  4. Change it to an appropriate name
Now replace ClientName in the code I gave you with the name you actually gave your label.
 

Users who are viewing this thread

Back
Top Bottom