Full Version: Mouse wheel - how to disable?
UtterAccess Forums > Microsoft® Access > Access Forms
I want to disable the mouse wheel function on forms - how do i do this? It's very annoying when you're typing info. into a form - and the wheel is touched and suddenly you're in a different record!
Is there any VBA for this? I see there is a 'On Mouse Wheel' event - but i'm not sure what to do...?
Many thanks,
You might want to check thi out:
Stephen Lebans hack, at the link jurotek gave, has been the answer for a long time now. Once called the wheel remains locked until the database is closed. Just follow the instructions carefully.
After years of knowing about the problem (since approximately one day after the first mouse with wheels hit the market) Microsoft finally got around to addressing it in v2007.
I have not tested this yet ... but ... from "here say", it seems to be a VBA solution that works around the issue you are trying to solve ...
In addition, I have used the technique of limiting a form to ONE record, and using Combo/List box navigation.. something like what is found in the attachment here:
Another hack method I suppose (assuming you're not already running anything in your Form_BeforeUpdate event) is to actually force the Dirty property to True there, although if no changes have been made to the record, I imagine an accidental move off the record may not be as annoying as after having made some changes to it.
So, if you're simply trying to prevent the scroll after changes have been made, you can handle it in Form_BeforeUpdate without coercing Me.Dirty = True, since it already is Dirty.
Thanks for all your suggestions! I used the VBA method suggested by datAdrenaline - and it works perfectly. : )
I was reluctant to use the Stephen Lebans hack - only because I think this involves uploading a DLL, which my system server didn't like.
Thanks again, Carolyn.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.