Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316

    Unanswered: On Mouse Wheel Event (Access 2003)

    Is there a way to disable the mouse wheel using the On Mouse Wheel Event in Access 2003? I've tried a few things (such as redirecting the action to something other than the Event Procedure) but to no avail.

  2. #2
    Join Date
    Mar 2004
    Location
    UK
    Posts
    82
    yes, search under mouse hook

  3. #3
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316
    I just tried that, and all the results point to the use of the mousewheel.dll. This dll was made before Microsoft included the On Mouse Wheel Event in forms. That dll has caused me problems in the past so I would rather use a solution that uses the On Mouse Wheel Event in Access 2003. Can anyone help?

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Came across this several places yesterday in passing, don't remember which sites. This is for Access 2003 only!

    Code:
    Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
        
        If Count > 0 Then
            DoCmd.GoToRecord , , acPrevious
        Else
            DoCmd.GoToRecord , , acNext
        End If
        
    End Sub
    Basically it looks to see when the mousewheel scrolls a line (COUNT) and reverses the move; goes back one record or forward one record.

    BTW, does anyone know how to report problems on this forum? I've noticed before that posts I thought I'd responded to didn't have my pearls of wisdom later, and thoght I'd perhaps, in my dotage, neglected to hit the Submit button, but I know that I responded to this post last night! Someone came in and asked what I was doing. I showed them how the forum worked, and showed them the entire thread, including my post!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316
    Thanks for the code, but it still isn't sufficient for my requirements as my form contains a hefty amount of validation that would kick-in as soon as the next record is advanced to.

  6. #6
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Sorry! It's amazing to me that Microsoft would finally address the existence of the mousewheel, and ignore addressing the ability to disable it. This problem has been discussed here and in every other forum in existence on Access at least weekly since the mouse got wheels!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    Join Date
    Mar 2004
    Location
    UK
    Posts
    82
    I'm using 2003 to run a 2000 db, set to run in 2000 as default, no probs with mouse hook, those damd page up and page down can be a pain though

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •