Results 1 to 6 of 6
  1. #1
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124

    Mouse wheel changing record


    How can i prevent mouse wheel changing records in a form?

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    A gentleman by the name of Stephen Lebans has a sample database that does this and it can be downloaded at:

    http://www.lebans.com/mousewheelonoff.htm

    First, 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.

  3. #3
    ashu.doc is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jul 2012
    Posts
    124
    Quote Originally Posted by Missinglinq View Post
    A gentleman by the name of Stephen Lebans has a sample database that does this and it can be downloaded at:

    http://www.lebans.com/mousewheelonoff.htm

    First, 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.

    Thats working very nicely, many thanks. So I suppose it has blocked the mouse wheel, is it possible that it does not roll the data but it does roll the page because its always easier to roll the page with mouse and enter the data??

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Have no idea! Don't have version 2003 available, right now, and I never make forms so long as to require the usert to scroll in order to view/enter all data! This is considered, by most experienced developers, to be very user-unfriendly!

    If you have more fields than will comfortably fit on one screen, the usual approach is to use a Tabbed Control, group your fields together, logically, and place them on multiple Pages of the TC.

    But why not answer your question yourself? Why not simply try it out?

    Linq ;0)>

  5. #5
    ResTech is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2013
    Posts
    3
    I but the above code in my form load and it isn't working for me..any suggestions?

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Have you downloaded the Lebans sample database and followed the instructions as given in Post #2?

    Linq ;0)>

Please reply to this thread with any new information or opinions.

Similar Threads

  1. go to next record by scroll wheel
    By smahdih in forum Access
    Replies: 3
    Last Post: 10-30-2011, 05:50 PM
  2. mouse wheel event
    By blueraincoat in forum Access
    Replies: 0
    Last Post: 03-30-2011, 12:42 AM
  3. How do I enable the mouse wheel in forms
    By Vic Blake in forum Forms
    Replies: 4
    Last Post: 02-22-2011, 09:23 AM
  4. Mouse Wheel Off
    By Terrie in forum Forms
    Replies: 3
    Last Post: 02-10-2011, 09:01 AM
  5. Replies: 1
    Last Post: 06-02-2009, 04:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums