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

Access form stop Scroll button

P: 64
Hi there,

I have created one ms access form which based on a table.

Now when I use scroll wheel of my mouse on the form it automatically changes records.

How can I disable scroll wheel

Thanks,
Yogesh
Jul 18 '07 #1
Share this Question
Share on Google+
1 Reply


missinglinq
Expert 2.5K+
P: 3,532
Access 2007 has the ability to do this built in. For other versions you have to use an add-in.

Stephen Lebans has a sample database that does this and can be downloaded at:

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

Download and unzip the db and take a look. In your db and goto File > External Data > Import and import the module modMouseHook from the sample database.

You need to place a copy of the MouseHook.dll file in the same folder as your database. Itís normally a Hidden file, so youíll have to unhide it, Find it, then copy it to the folder.

In the first form to load in your db use this code:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.    ' Turn off Mouse Scroll
  3.     blRet = MouseWheelOFF
  4. End Sub
Good Luck!

Linq ;0)>
Jul 18 '07 #2

Post your reply

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