I am not sure but I believe that you have to use the mouse wheel "events" in Access XP. Use the events to test what you want your users to do or not do when they use the scroll wheel on their mouse.
You can put code in the on mousewheel event of each form. I tried to put docmd.cancelevent but this doesn't work. It just passing by the code en don't stop scrolling any idees???
Hi, I am not having much luck either in finding what the OnMoouseWheel does. My AccessXP Help returns nothing on it. I'll keep looking as I'd really like to know what this property can do for disabling it.
MouseWheelHook.zip
is an Access97 MDB demonstrating how to use a MouseHook to turn off the MouseWheel. No more MouseWheel.DLL Hell! No DLL registration required. Just copy the included MouseHook.DLL into your Windows/System folder or into the same folder as your application MDB. One instance handles all Forms and SubForms.
It Replaces the MouseWheel DLL subclassing solution. Turns On/Off the MouseWheel with one line of code. No DLL registration required.
I emailed Steven about this, asking if the above file would work in Access XP. His response was that it is a DLL that will work with all versions. I'll be trying it out in the next day.
There are some samples posted in this board on how to "disable" the mouse wheel. I have used one of those sample db's and also posted my version of the db where I use command buttons to turn ON or OFF the mouse wheel function to scroll through the records within a form. This example does not involve any DLLs nor does it involve testing if the current record is dirty.
Here is a link to the thread where I posted the sample [I only 'modified' the original] that shows how easy it is to actually disable or enable the mouse wheel to prevent or allow a user to scroll through the form records. My posted sample with the command buttons I added is near the bottom of this thread... nomouse.zip
Here is a link to a sample db that I designed to not allow a user to move off the current record if it has been modified [dirty]... A better mouse trap?
Here I am, closing in on the final scenes of this act in the development of a commercial application. Testing and debugging a form for the wheel mouse. Have I been successful in disabling it?
I use a Logitech 4-button Marble Mouse (Model: T-BC21) on my main development PC, should be the same, right? Wrong!
When enabling the auto-scroll on the Marble, I can get to a new record. Moving over to another test PC with the Wheel mouse, the Wheel IS disabled. Interesting, eh?
My wheel disabling code is probable a mixture but leverages Steven Leban's MouseHook.DLL and the modMouseHook module.