Can I disable the Mouse wheel?

PRD

Registered User.
Local time
Yesterday, 19:34
Joined
May 18, 2011
Messages
72
Hello, I created a Form to add records to a database and one of my users accidentally scrolled the Mouse wheel while on the Form. This action added several blank records to the table.

Is there a command I can use to temporarily disable the user's Mouse wheel? Just curious. Thank you.
 
My experience is that if you disable it, users will want it enabled and if you enable it they will want it disabled ;)
You can't please them all eh! ;)

@PRD: I'm guessing this is a pre Access 2007 db? It's always good to know what version of Access you're working with for questions like this.
 
I was unable to get this to work but I don't think its worth pursuing further. I volunteer for a non-profit organization and much of their hardware and software is rather outdated (they're still running on Windows XP) and so we just try to make do with what we have. I think the simplest solution to this problem will be to just find an old mouse with no mousewheel. Thanks for your efforts, it is much appreciated.
 
We still don't know what version of Access you're working with?
 
I would surmise that if the users are able to scroll using the mouse that it's a pre-2007 version of Access.

Do you want to elaborate on where the difficulty was implementing Lebans' solution? I've used it successfully.

SHADOW
 
To try the Leban’s solution I just created two dummy command buttons and copied the following code into the ‘OnClick’ Event Procedure of each button..

Private Sub Command14_Click()

Dim blRet As Boolean
blRet = MouseWheelOFF

End Sub

Private Sub Command15_Click()

Dim blRet As Boolean
blRet = MouseWheelON

End Sub

I then tried scrolling through a tabular Form using the mousewheel and was able to scroll no matter which command button I clicked.

As I am only a volunteer at this organization I am reluctant to download zip files and install programs from unknown sources (no offense). I guess I was hoping that Access itself would have some simple ‘DoCmd’ to disable the wheel.
 
As I am only a volunteer at this organization I am reluctant to download zip files and install programs from unknown sources (no offense).
I guess you will have to make do with what you have at the moment.

Good luck with the rest of your project!
 
Lebans' hack has been successfully used by thousands of people over they years. You placed the code in your Command Buttons, but did you actually download the file? The code you posted doesn't work without the Function that it Calls.

Go into your db file and go to File > External Data > Import and import the module modMouseHook from the downloaded Lebans' sample database. Next make sure you have the included file, MouseHook.dll, in the same folder your database resides in. Now your Buttons should work.

Or you could just switch to a non-wheeled mouse! Of course, some helpful soul, missing the wheel, will probably bring one in and switch it out! Users are so helpful!

Linq ;0)>
 
Lebans' hack has been successfully used by thousands of people over they years. You placed the code in your Command Buttons, but did you actually download the file? The code you posted doesn't work without the Function that it Calls.
PRD doesn't want to download anything from a source he has no knowledge of.
 
I got that! I was trying to explain to him why simply trying the Calling code without the Function wouldn't work! And that Lebans' site was safe for downloading from, at least for everyone who's been doing so for the past umpteen years!
 
Just wanted to let you know that I convinced my supervisor to give me the go-ahead to install Leban's hack - works great! Thanks again for all of your help!
 
Glad to hear it! Downloading from Stephen's site really is very, very much safer than accessing your email account!

Good luck with your project!

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom