Results 1 to 2 of 2
  1. #1
    Coffee is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2011
    Location
    Australia
    Posts
    31

    Creating a mouse hover event

    hi, i am trying to make the textbox change color when mouse is run over the button and then go back to the default color.. at the moment it changes color to red when mouse is over, but it does not change back. does anyone know how to do this?

    Code




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

    Me.Text11.BackColor = vbRed

    End Sub


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

    Me.Text11.BackColor = vbBlack

    End Sub

  2. #2
    Coffee is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2011
    Location
    Australia
    Posts
    31
    Dont worry, problem solved. instead of Form2 it needs to be Detail.

    Working Code

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

    Me.Text11.BackColor = vbRed

    End Sub


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

    Me.Text11.BackColor = vbBlack

    End Sub

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Command Button Hover Issues
    By JeffG3209 in forum Database Design
    Replies: 6
    Last Post: 08-10-2011, 05:17 AM
  2. mouse wheel event
    By blueraincoat in forum Access
    Replies: 0
    Last Post: 03-30-2011, 12:42 AM
  3. Mouse Wheel Off
    By Terrie in forum Forms
    Replies: 3
    Last Post: 02-10-2011, 09:01 AM
  4. On Mouse Move, Flickering
    By 95DSM in forum Programming
    Replies: 1
    Last Post: 01-04-2011, 08:35 AM
  5. Mouse Pointer Changes
    By BernardKane in forum Programming
    Replies: 2
    Last Post: 06-28-2006, 04:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums