How do I Disable the scroll button on the mouse.

  • Thread starter Thread starter Dr. Hung
  • Start date Start date
D

Dr. Hung

I dont want the user to be able to use the Middle scroll wheel on the
mouse when he's in a form. It brings up a warning message about null
values when this happens and it will confuse the user.

Any ideas would be great thanks..

Martin R
 
i copied the code from that link, But it does not stop the mouse
wheel's function. The reason why i want to disable it is because, when
i am entering data, i dont want the person to scrowl the mouse on to a
new record or a previous one without finishing with the current records
details first. Why might this code not be working. I have it in the
open form event. here is the code:

Private Sub Form_Open(Cancel As Integer)
Dim blRet As Boolean
blRet = MouseWheelOFF
End Sub
 
I am now getting an error message that says,


"Variable not defined"
MouseWheelOff is highlighted.

How do i define this??

Here is the code again:

Dim blRet As Boolean
blRet = MouseWheelOFF

Martin R
 
Did you download the sample database and copy the code from it? Did you copy
the included MouseHook.DLL into your Windows/System folder or into the same
folder as your application MDB?
 
Much better to use the Form's On Error Event to give the users a more
"friendly" message

Pieter
 
Well Hung, I'm glad Doug was able to straighten you out.
;-)

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
It might, but you'd probably have to use the same VB in Excel as you do in
Access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top