Results 1 to 5 of 5
  1. #1
    Join Date
    May 2012
    Posts
    89

    Unanswered: Problems (annoyed) with the scroll button on the mouse!!!

    I need some help i have a form where i insert data.
    This form is for inserting data only.
    But when i use the scroll button on the mouse it go's to the previous or next records, there fore i want to block the scroll button on the mouse.

    I hope there is a way to do this (in access and not in the system reg.)

    THX

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Since the Boys of Redmond finally addressed this problem, in 2007, I assume that you're using version 2003 or earlier. A gentleman by the name of Stephen Lebans has a sample database that shows how to 'lock' the wheel, and it can be downloaded at:

    MouseWheelOnOff

    There are a couple of versions on the page, one for version97, I believe, and another for everything up to 2003; be sure to download the one that is appropriate for your machine.

    Download and unzip the db and take a look. Go into your db and goto File > External Data > Import and import the module modMouseHook from the sample database. Next make sure you have the included file, MouseHook.dll, in the same folder your database resides in. The following code needs to run before the mousewheel will be locked:
    Code:
    Private Sub Form_Load()
     'Turn off Mouse Scroll
     blRet = MouseWheelOFF
    End Sub


    If you have one form that always loads first in your db, place the code there. If the first form to load varies, place the same code in each form.

    You should be set now. BTW, everything goes back to normal after you close an Access database that uses this hack.

    Linq ;0)>
    Hope this helps!

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

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    May 2012
    Posts
    89
    Aha great many thanks.
    Works like a charm.

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Glad you got it working! As I said, if you ever update to 2007 or later you'll find that the Boys of Redmond finally got around to fixing this problem! Of course, now people are complaining because they've 'lost' this same function!

    Linq ;0)>
    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
    May 2012
    Posts
    89
    I Probably wont upgrade anytime soon but when i do if got the code.
    I have trouble with an other issue with MS Access, hope you can direct me on my way.

    http://www.dbforums.com/microsoft-ac...ml#post6583324

    Hope to hear from you there.

Posting Permissions

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