[AccessD] A2K: Trap Mouse Scroll Wheel

Doug Murphy dw-murphy at cox.net
Wed Aug 31 11:28:52 CDT 2005


In Access XP is use the following in a forms module to keep the mouse wheel
from moving through records.  The routine uses the On Mouse Wheel event and
On Current Event.

Delclare a String variable at the module level sCurRec

Then put the following in the appropriate events

Private Sub Form_Current()
    If sCurRec <> "" Then
    Me.Bookmark = sCurRec
    sCurRec = ""
    End If
End Sub

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
sCurRec = Me.Bookmark

End Sub

I don't know if the On Mouse Wheel event is in Access 2000


Doug
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe Rojas
Sent: Wednesday, August 31, 2005 8:02 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] A2K: Trap Mouse Scroll Wheel


Hi All,

Is it possible to trap the mouse scroll wheel event in Access 2000? If so,
how is this done?

Normally the scroll wheel will scroll through the records on a form but I am
looking for a way to disable this from happening.

I know that I could disable the wheel in windows but I don't want this to be
a system wide change, just when the user scrolls in Access.

Thanks!
JR




This electronic transmission is strictly confidential to TNCO, Inc. and
intended solely for the addressee. It may contain information which is
covered by legal, professional, or other privileges. If you are not the
intended addressee, or someone authorized by the intended addressee to
receive transmissions on behalf of the addressee, you must not retain,
disclose in any form, copy, or take any action in reliance on this
transmission. If you have received this transmission in error, please notify
the sender as soon as possible and destroy this message. While TNCO, Inc.
uses virus protection, the recipient should check this email and any
attachments for the presence of viruses. TNCO, Inc. accepts no liability for
any damage caused by any virus transmitted by this email.
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list