By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,948 Members | 1,559 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,948 IT Pros & Developers. It's quick & easy.

Mouse wheel annoyance!

P: 6
Is there a way to stop the mouse wheel from scrolling through records?
Feb 25 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,532
If you're running Access 2007, you already have a function that addresses this issue! Just check with Help.

For all other versions, you'll need some outside help. A gentleman by the name of Stephen Lebans has a sample database that does this and it can be downloaded at:

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:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. ' Turn off Mouse Scroll
  3. blRet = MouseWheelOFF
  4. 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 now be set!

Welcome to TheScripts!

Linq ;0)>
Feb 25 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.