Mouse move event question.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pfm721
    New Member
    • Jun 2008
    • 8

    Mouse move event question.

    I know the control tip text will display information about a text box. However I was wondering if there is a way to change it based on the value of the text box. Is it possible to create a mouse move event that will do the same thing?

    i.e. value of txtStatus

    If [txtStatus] = A then "good"
    If [txtStatus] = B then "bad"

    something to that effect. I don't really know if it is possible or how to code it. Any help would be greatly appreciated.

    Thanks,
    Patrick
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    If I understand your question, this should do the job:

    Code:
    Private Sub txtStatus_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
     If Me.txtStatus = "a" Then txtStatus.ControlTipText = "Good"
     If Me.txtStatus = "b" Then txtStatus.ControlTipText = "Bad"
     If Me.txtStatus <> "a" And Me.txtStatus <> "b" Then txtStatus.ControlTipText = ""
    End Sub
    Welcome to Bytes!

    Linq ;0)>

    Comment

    • pfm721
      New Member
      • Jun 2008
      • 8

      #3
      Thanks, worked like a charm.

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        Glad we could help!

        Linq ;0)>

        Comment

        Working...