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

Scroll button

P: 29
I'm designing a form and I want to deactivate the scroll button. Everytime someone uses the scroll button, it goes to either a new record or previous record. I don't want this capability. May I get some help?
Aug 11 '08 #1
Share this Question
Share on Google+
5 Replies


NeoPa
Expert Mod 15k+
P: 31,602
If you look in the properties of the form you should see what you need.

The combination of selections depends on exactly what you require.
Aug 11 '08 #2

missinglinq
Expert 2.5K+
P: 3,532
He's not actually talking about the scroll bar, he's talking about the mouse's scroll wheel! I only know this because this question was also posted in another forum and this was figured out there.

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 free 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:

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

Linq ;0)>


As was See what Stephen Lebans has at http://www.lebans.com/mousewheelonoff.htm
Aug 12 '08 #3

NeoPa
Expert Mod 15k+
P: 31,602
Thanks for that Linq. It does make better sense in that light of course ;)
Aug 12 '08 #4

P: 29
Thanks for that Linq. It does make better sense in that light of course ;)
Yes this works. Got the mousehook.dll all set up and it's running smoothly.
Aug 12 '08 #5

missinglinq
Expert 2.5K+
P: 3,532
Glad we could help!

Linq ;0)>
Aug 12 '08 #6

Post your reply

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