Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303

    Post Unanswered: Mouse Wheel Access 2002

    The following is from the msdn.microsoft.com/library Access 2002 for Developers, by Mike Gunderloy

    The MouseWheel event is interesting in theory, but in practice it suffers from implementation. Here's the declaration for the event:

    Private Sub Form_MouseWheel( _
    ByVal Page As Boolean, ByVal Count As Long)

    Notice what's missing? There's no Cancel argument. You can sense that the user is changing records on a form via the mouse wheel, but you can't do anything about it. In addition, given that you're going to receive a Current event as well, it's hard to come up with a good use for the MouseWheel event.

    I'm dying for an easy solution to turn off the mouse wheel or make it inop.

    I've tried some of the other solutions available, but after putting hooks in on forms, debugging the code becomes painful.

    Could any of you guru's outline a suggestion to make use of Access 2002 mouse wheel event?
    1) Disregard record(s) created and
    2) Return to the original record prior to being kidnapped by the psychopathic mouse wheel.
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  2. #2
    Join Date
    Dec 2003
    Location
    WA, USA
    Posts
    51

    Re: Mouse Wheel Access 2002

    Try this article -- Microsoft Knowledge Base Article - 278379
    I have used this code in Access 2000 and it works great on primary forms. I have not had any luck getting it to work with sub forms.

    Good Luck
    Bob

  3. #3
    Join Date
    Nov 2003
    Posts
    1,487
    Check out this little sample DB (attached) from Lebans Holdings 1999 Ltd. It will demonstrate to you how to turn ON or OFF the mouse wheel whenever you want. The source is included and very easy to use.

    I hope this helps you
    Attached Files Attached Files

  4. #4
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    Thanks for your input. No doubt your answers will help others too.
    Just to let you know, I have tried both the DLL fix and the all-code-in-Access approaches prior to posting this latest request. They work but are not what I was hoping for when coding and debugging and deploying to multiple users.

    For what its worth...
    I snapped out of my coma and figured out how to avoid some of the problems that the mouse wheel created for my database.
    I hit upon the idea that the forms should prohibit the creation of new records. So I set the AllowAdditions property to False. This database has always controlled the creation of new records. New records are created by code when the user selects my ‘Add New’ button. Thus, this setting will resolve at least half of the problem - unwanted new records.

    I still have the problem that the mouse navigates away from a record prior to allowing me to execute code on that record.

    After looking around a little (again! DBForums, MSDN, Experts-exchange, MS Knowledgebase, etc.),
    I think that MS Access should make
    a BeforeMouseWheel event with a Cancel option
    in the first round of fixes to Access 2003.


    Please forward my idea to Mr.Gates and the folks at Microsoft.
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

Posting Permissions

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