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:
- Private Sub Form_Load()
-
'Turn off Mouse Scroll
-
blRet = MouseWheelOFF
-
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)>