Connecting Tech Pros Worldwide Forums | Help | Site Map

Turning off the Scroll Wheel in Access 2003

Member
 
Join Date: Nov 2008
Posts: 47
#1: Nov 12 '08
I've got a patient enrollment application (functionally similar to a customer/order entry application). My problem comes when users accidentally hit the scroll wheel -- it can take them to a different patient.

I'm looking for a VB way of preventing users from changing members with the mousewheel. Any ideas?

(I'm told that this is easy on later versions of Access, but I'm stuck with what I've got.)

Thanks for the help


Dante

Newbie
 
Join Date: Nov 2008
Posts: 4
#2: Nov 20 '08

re: Turning off the Scroll Wheel in Access 2003


I don't know about the VBA , but if you go into your design view and then to the Properties of the Sheet Their is an Option whereby you can go to the ScrollBar menu on the "ALL" Tab and then turn it "Off" so that it doesn't show at all in your Formview. I am not sure if that is what you requested , but I have done that numerous times to ensure that the Employees don't see the Scroll Bars
Delerna's Avatar
Expert
 
Join Date: Jan 2008
Location: Sydney
Posts: 790
#3: Nov 20 '08

re: Turning off the Scroll Wheel in Access 2003


I would like to know the answer to this too?
Without having to resort to buying mice without wheels????
Member
 
Join Date: Sep 2008
Posts: 95
#4: Nov 20 '08

re: Turning off the Scroll Wheel in Access 2003


The only thing I could think of at this point is using the 'MouseWheel' event and a 'DoCmd.CancelEvent'; but I'm assuming you've probably already tried this?

Or there is always the good old 'hammer-to-the-hand-of-whoever-scrolls' method.. might get you in a little trouble tho ;)
DonRayner's Avatar
Expert
 
Join Date: Sep 2008
Location: Canada
Posts: 494
#5: Nov 20 '08

re: Turning off the Scroll Wheel in Access 2003


Quote:

Originally Posted by dantebothermy

I've got a patient enrollment application (functionally similar to a customer/order entry application). My problem comes when users accidentally hit the scroll wheel -- it can take them to a different patient.

I'm looking for a VB way of preventing users from changing members with the mousewheel. Any ideas?

(I'm told that this is easy on later versions of Access, but I'm stuck with what I've got.)

Thanks for the help


Dante

This should help you. The information about doing it completly in access is about half way down the page.

http://support.microsoft.com/kb/278379
missinglinq's Avatar
Moderator
 
Join Date: Nov 2006
Location: Richmond, Virginia USA
Posts: 3,000
#6: Nov 20 '08

re: Turning off the Scroll Wheel in Access 2003


Susan misread the original post; we're talking bout the Scroll Wheel on the mouse, not the ScrollBar.

I haven't picked apart the code from Micro$oft, but Stephen Lebans hack has been used by many of us for many years. This link goes to a download for his sample database.

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
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)>
Reply


Similar Microsoft Access / VBA bytes