Turning off the Scroll Wheel in Access 2003

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dantebothermy
    New Member
    • Nov 2008
    • 47

    Turning off the Scroll Wheel in Access 2003

    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
  • SUSAN MALAN
    New Member
    • Nov 2008
    • 4

    #2
    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

    Comment

    • Delerna
      Recognized Expert Top Contributor
      • Jan 2008
      • 1134

      #3
      I would like to know the answer to this too?
      Without having to resort to buying mice without wheels????

      Comment

      • mandanarchi
        New Member
        • Sep 2008
        • 90

        #4
        The only thing I could think of at this point is using the 'MouseWheel' event and a 'DoCmd.CancelEv ent'; 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 ;)

        Comment

        • DonRayner
          Recognized Expert Contributor
          • Sep 2008
          • 489

          #5
          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.

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            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.



            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:

            Code:
            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)>

            Comment

            Working...