Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2007

    Unanswered: Solution offer - preventing mouse scroll in Access forms!

    This forum has been very helpful so I decided to give something back - a solution that bugged me and has an easy work around (me thinks so).

    It came to my attention that if you want to prevent unwanted record navigation (problem that frequently pops-up) in Access form you have to do the following:

    1. Turn on Cycle through this record only property, thus preventing TAB click on last control to jump to next record (or catch On Exit and redirect focus to first form control)

    2. Turn off PgUP and PgDOWN -> easily done with KeyDown event

    3. Turn off record navigation property

    4. PREVENT MOUSE SCROLLs -> SOLUTION NOT EASILY IMPLEMENTED (you can find code and instructions but I was to unpatient and lazy to go through 3 pages of code just to turn off mouse wheel)

    So,the solution would be to buy users wheelless mouses or turn off mouse wheel before opening your database via outside program.

    And the outside program is called AutoHotkey - it's great, simple, small, intuitive and completely free way of automating Windows tasks or assigning custom hotkeys (with a great community too)!

    All you have to do is write 3 lines of code, save it as .ahk file and compile it (instructions are simple and found on AutoHotkey site)

    Run ........ name of your database or exe file to run it (in autohotkey sintax - help online) .............


    and voila MouseWheel no longer works!

    P.S. If you would still like mouse wheel to work in some forms and not work in others AutoHotkey has methods for monitoring window titles and you could catch that and turn mousewheel navigation on and off!
    Last edited by Riorin; 12-02-07 at 06:35.

  2. #2
    Join Date
    Nov 2003
    Thanks for sharing Riorin.

    Self Taught In ALL Environments.....And It Shows!

  3. #3
    Join Date
    Dec 2004
    Madison, WI
    There's also a good example in the code bank on turning on/off the mousewheel with very little code.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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