mouse wheel fm

F

Fred Loh

i have a table with an underlying table. when i move the wheel of the mouse,
the form moves to another record or a blank record.

2 questions.

1. how do i make the form NOT move to another record when the mouse wheel is
moved? can the mouse wheel be disabled?

2. how do i make the mouse wheel scroll the text in a textbox?

thanks for your help
 
L

Linq Adams via AccessMonster.com

There are a couple of hacks out there do do this, but the reference Wayne
gave you really is the gold standard. After downloading the sample database,
take a look at it. Then go into your target database 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. Once
turned off, it'll remain off until you turn it back on or exit the
application.

Unfortunately, the scrollwheel is either on or off, so you can't have if off
except when you want to scroll in a textbox/memo field. If you turn it back
on when you're in a textbox, you'll get the behavior you're trying to prevent,
with it scroll to another record.

Linq
 

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

Top