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

    Unanswered: Disable mouse-roller

    I have the following routine to disable specific keys:

    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    '33 - PgUp; 34 - PgDown; 9 - Tab; 18=Alt
    Select Case KeyCode
    Case 33, 34, 9, 18
    KeyCode = 0
    Case Else
    'Debug.Print KeyCode, Shift
    End Select
    End Sub

    Can this be modified to disable the mouse roller? If not, does anyone know of a way to disable the mouse-roller on a form? I've done a search on this forum, but to no avail.

  2. #2
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    I think the means to prevent the mouse wheel from causing havoc with database records is pretty complicated.

    See Microsoft Knowledge Base.
    How to Detect and Prevent the Mouse Wheel from Scrolling Through Records in a Form

    They provide a solution outside of Access...
    Creating the MouseWheel Event by Using a Visual Basic ActiveX DLL

    and one within access...
    Creating the MouseWheel Event Completely Within Microsoft Access

    Microsoft Knowledge Base Article - Q278379
    http://support.microsoft.com/default.aspx?scid=kb;en-us;q278379

    hope that helps.
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  3. #3
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120

    Try this

    I have used the below thread to prevent the mouse scroll.
    Check out all of the code and the module.
    This was donated on another board, and tweaked along the way.
    This code works on Windows 98 or 2000. I have had no problem with it.

    Hope it works for everyone - here is the link to the thread http://www.wopr.com/cgi-bin/w3t/show...c=1#Post126475

    THANKS TO "ACCESSMAN" !!!!!

    Michael
    Last edited by mrabrams; 07-31-02 at 12:11.

  4. #4
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316
    OK, I tried out Accessman's routine but it just freezes Win98/Win2000. I'll try out those MS knowledgebase solutions next...

  5. #5
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120

    Try mine

    This was developed on Win2000/ Access 97

    I will leave it up until tomorrow.

    This works wonderfully on my 20 machines here at work.

    Please let me know if this works for you, (or anyone else who tries it).

    Michael
    Last edited by mrabrams; 08-01-02 at 16:11.

  6. #6
    Join Date
    Sep 2002
    Posts
    4

    Re: Try mine

    PLEEEZE could I have a opy of the code which stops the wheel mouse on forms in Access 97. I have tried to follow some threads but I get zillions of errors!

    mail@colinlaughton.com

  7. #7
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120

    Mouse scroll

    Here it is again. I will leave it out there for a couple of days.

    Michael
    Last edited by mrabrams; 09-19-02 at 11:04.

  8. #8
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    And here is the link the the microsoft knowledge base info.

    How to Detect and Prevent the Mouse Wheel

    again...
    They provide a solution outside of Access...
    Creating the MouseWheel Event by Using a Visual Basic ActiveX DLL

    and one within access...
    Creating the MouseWheel Event Completely Within Microsoft Access
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  9. #9
    Join Date
    Sep 2002
    Posts
    4

    Unhappy

    . . . But that only works for ACC 2000. The solution inside access that is. I tried creating the active X dll but for SOME reason it works at home but at work you can't seem to make a reference to a DLL file !!! When you search for it the browser window just does not see the DLL i made. A bit like trying to import external data from a text file but access does not have the txt filter installed. All very frustrating

  10. #10
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120

    Bottom Line

    The attached code works on all of my forms and on all of our workstations.
    I am using Windows 2000 and Access 97.

    If you check out the module in the attached db, you will see a line 'rem'd out concerning if you are using Windows 98/2000.
    If you are not, then you need to rem the Windows 2000 code and "un" rem the other code.

    Like I said, it took many contributors and many days/nights to tweak this, but it works as advertised now. (See the thread I have url'd above.)

    Hope this can help some of you.

    Michael

  11. #11
    Join Date
    Sep 2002
    Posts
    4

    Smile Re: Mouse scroll

    THANK YOU THANK YOU THANK YOU THANK YOU

  12. #12
    Join Date
    Sep 2002
    Posts
    4

    Re: Mouse scroll

    This solution should be SOLD to MS for zillions of dollars 'cos their solution invites you to buy VB 6 !! Typical of them I tink

Posting Permissions

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