Scroll wheel mystery

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Devonish

    Scroll wheel mystery

    I have a form designed as a Continuous form which displays one record
    per
    line. Taking account of the header and footer and the size of the
    screen, I
    can display 30 records at a time. I can see other records by scrolling
    up or
    down with either the scroll bar on the right of the screen, or the up
    and down
    arrows which are above and below this scroll bar; or I can use the
    scroll wheel
    on the mouse.

    If however, by filtering, fewer than 30 records need to be displayed the
    mouse's scroll wheel behaves strangely. Now I know that there is no
    need to
    scroll when all records are visible but I have a client who madly uses
    the scroll
    wheel at all times. Furthermore, it is not always immediately obvious
    that all
    records are visible (e.g. when there are, say 29, on display).

    The scroll bar (to the right) fills its whole space, indicating that all
    records are
    visible, and therefore cannot be moved. However it is possible to use
    the
    arrows to scroll down (losing some records form the top) and then scroll
    upto
    redisplay them all.

    It is also possible to use the scroll wheel to scroll down (again losing
    uppermost records) but when one tries to scroll back up again with the
    wheel
    the top record is never made visible. It is always just out of reach.
    (By using
    the arrow, it can be made available again)

    Why does the scroll wheel have this strange behaviour? and is there any
    way
    round it? (that is without using the arrows above and below the scroll
    bar)


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Stephen Lebans

    #2
    Re: Scroll wheel mystery

    Unfortunately Access will scroll the form to positions that are
    technically not valid for the Scrollbar itself. It's a real pain in the
    ass and has been for years! The only solution would be to subclass each
    and every form which in my opinion is not practical.
    :-(

    --

    HTH
    Stephen Lebans

    Access Code, Tips and Tricks
    Please respond only to the newsgroups so everyone can benefit.


    "Devonish" <no.spam@nowher e.com> wrote in message
    news:409104fa$0 $197$75868355@n ews.frii.net...[color=blue]
    > I have a form designed as a Continuous form which displays one record
    > per
    > line. Taking account of the header and footer and the size of the
    > screen, I
    > can display 30 records at a time. I can see other records by[/color]
    scrolling[color=blue]
    > up or
    > down with either the scroll bar on the right of the screen, or the up
    > and down
    > arrows which are above and below this scroll bar; or I can use the
    > scroll wheel
    > on the mouse.
    >
    > If however, by filtering, fewer than 30 records need to be displayed[/color]
    the[color=blue]
    > mouse's scroll wheel behaves strangely. Now I know that there is no
    > need to
    > scroll when all records are visible but I have a client who madly uses
    > the scroll
    > wheel at all times. Furthermore, it is not always immediately obvious
    > that all
    > records are visible (e.g. when there are, say 29, on display).
    >
    > The scroll bar (to the right) fills its whole space, indicating that[/color]
    all[color=blue]
    > records are
    > visible, and therefore cannot be moved. However it is possible to use
    > the
    > arrows to scroll down (losing some records form the top) and then[/color]
    scroll[color=blue]
    > upto
    > redisplay them all.
    >
    > It is also possible to use the scroll wheel to scroll down (again[/color]
    losing[color=blue]
    > uppermost records) but when one tries to scroll back up again with the
    > wheel
    > the top record is never made visible. It is always just out of reach.
    > (By using
    > the arrow, it can be made available again)
    >
    > Why does the scroll wheel have this strange behaviour? and is there[/color]
    any[color=blue]
    > way
    > round it? (that is without using the arrows above and below the scroll
    > bar)
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it![/color]

    Comment

    • Bob Bergman

      #3
      Re: Scroll wheel mystery

      Go to www.microsoft.com and search for the article... 278379 -
      ACC2000: How to Detect and Prevent the Mouse Wheel from Scrolling
      Through Records in a Form.

      I use the code in the sample on most of my applications, works well.

      Bob


      "Stephen Lebans" <ForEmailGotoMy .WebSite.-WWWdotlebansdot com@linvalid.co m> wrote in message news:<5oBkc.328 42$Np3.1194251@ ursa-nb00s0.nbnet.nb .ca>...[color=blue]
      > Unfortunately Access will scroll the form to positions that are
      > technically not valid for the Scrollbar itself. It's a real pain in the
      > ass and has been for years! The only solution would be to subclass each
      > and every form which in my opinion is not practical.
      > :-(
      >
      > --
      >
      > HTH
      > Stephen Lebans
      > http://www.lebans.com
      > Access Code, Tips and Tricks
      > Please respond only to the newsgroups so everyone can benefit.
      >
      >
      > "Devonish" <no.spam@nowher e.com> wrote in message
      > news:409104fa$0 $197$75868355@n ews.frii.net...[color=green]
      > > I have a form designed as a Continuous form which displays one record
      > > per
      > > line. Taking account of the header and footer and the size of the
      > > screen, I
      > > can display 30 records at a time. I can see other records by[/color]
      > scrolling[color=green]
      > > up or
      > > down with either the scroll bar on the right of the screen, or the up
      > > and down
      > > arrows which are above and below this scroll bar; or I can use the
      > > scroll wheel
      > > on the mouse.
      > >
      > > If however, by filtering, fewer than 30 records need to be displayed[/color]
      > the[color=green]
      > > mouse's scroll wheel behaves strangely. Now I know that there is no
      > > need to
      > > scroll when all records are visible but I have a client who madly uses
      > > the scroll
      > > wheel at all times. Furthermore, it is not always immediately obvious
      > > that all
      > > records are visible (e.g. when there are, say 29, on display).
      > >
      > > The scroll bar (to the right) fills its whole space, indicating that[/color]
      > all[color=green]
      > > records are
      > > visible, and therefore cannot be moved. However it is possible to use
      > > the
      > > arrows to scroll down (losing some records form the top) and then[/color]
      > scroll[color=green]
      > > upto
      > > redisplay them all.
      > >
      > > It is also possible to use the scroll wheel to scroll down (again[/color]
      > losing[color=green]
      > > uppermost records) but when one tries to scroll back up again with the
      > > wheel
      > > the top record is never made visible. It is always just out of reach.
      > > (By using
      > > the arrow, it can be made available again)
      > >
      > > Why does the scroll wheel have this strange behaviour? and is there[/color]
      > any[color=green]
      > > way
      > > round it? (that is without using the arrows above and below the scroll
      > > bar)
      > >
      > >
      > > *** Sent via Developersdex http://www.developersdex.com ***
      > > Don't just participate in USENET...get rewarded for it![/color][/color]

      Comment

      • Stephen Lebans

        #4
        Re: Scroll wheel mystery

        Bob the OP's issue has to do with how far Access will scroll a Form
        versus the legal positions of the Scrollbar.

        By the way, if you are really using the code from the KB article then
        you must not be using an SubForms. A more flexible solution is here:

        MouseWheelHook9 7.zip is an MDB demonstrating how to use a MouseHook to
        turn off the MouseWheel. No more MouseWheel.DLL Hell! No DLL
        registration required. The MouseHook DLL is a standard Windows DLL. Do
        not try to Register it or set a Reference to it from within Access.
        Just copy the included MouseHook.DLL into your Windows/System folder or
        into the same folder as your application MDB. One instance handles all
        Forms and SubForms so only call the functions once from a SINGLE Form.
        Here is an A2K sample MDB including the DLL. MouseWheelHookA 2K.zip .
        Please note there is no difference between the MouseHook.DLL included in
        either the A97 or A2K ZIP file.

        Here is sample code that can be placed behind CommandButton controls.
        You could also place this code in the Load event of a single Form.
        Remember you need to call these functions only ONE TIME. The MouseHook
        will look after the MouseWheel messages for all forms that you have open
        now or at any time during your current session. Remember to turn the
        MouseWheel back on before you exit the current session!

        Private Sub Command14_Click ()
        ' Turn the MouseWheel Off
        Dim blRet As Boolean
        blRet = MouseWheelOFF
        End Sub


        --

        HTH
        Stephen Lebans

        Access Code, Tips and Tricks
        Please respond only to the newsgroups so everyone can benefit.


        "Bob Bergman" <technobob@bell south.net> wrote in message
        news:a661f717.0 405011845.15f93 252@posting.goo gle.com...[color=blue]
        > Go to www.microsoft.com and search for the article... 278379 -
        > ACC2000: How to Detect and Prevent the Mouse Wheel from Scrolling
        > Through Records in a Form.
        >
        > I use the code in the sample on most of my applications, works well.
        >
        > Bob
        >
        >
        > "Stephen Lebans"[/color]
        <ForEmailGotoMy .WebSite.-WWWdotlebansdot com@linvalid.co m> wrote in
        message news:<5oBkc.328 42$Np3.1194251@ ursa-nb00s0.nbnet.nb .ca>...[color=blue][color=green]
        > > Unfortunately Access will scroll the form to positions that are
        > > technically not valid for the Scrollbar itself. It's a real pain in[/color][/color]
        the[color=blue][color=green]
        > > ass and has been for years! The only solution would be to subclass[/color][/color]
        each[color=blue][color=green]
        > > and every form which in my opinion is not practical.
        > > :-(
        > >
        > > --
        > >
        > > HTH
        > > Stephen Lebans
        > > http://www.lebans.com
        > > Access Code, Tips and Tricks
        > > Please respond only to the newsgroups so everyone can benefit.
        > >
        > >
        > > "Devonish" <no.spam@nowher e.com> wrote in message
        > > news:409104fa$0 $197$75868355@n ews.frii.net...[color=darkred]
        > > > I have a form designed as a Continuous form which displays one[/color][/color][/color]
        record[color=blue][color=green][color=darkred]
        > > > per
        > > > line. Taking account of the header and footer and the size of the
        > > > screen, I
        > > > can display 30 records at a time. I can see other records by[/color]
        > > scrolling[color=darkred]
        > > > up or
        > > > down with either the scroll bar on the right of the screen, or the[/color][/color][/color]
        up[color=blue][color=green][color=darkred]
        > > > and down
        > > > arrows which are above and below this scroll bar; or I can use the
        > > > scroll wheel
        > > > on the mouse.
        > > >
        > > > If however, by filtering, fewer than 30 records need to be[/color][/color][/color]
        displayed[color=blue][color=green]
        > > the[color=darkred]
        > > > mouse's scroll wheel behaves strangely. Now I know that there is[/color][/color][/color]
        no[color=blue][color=green][color=darkred]
        > > > need to
        > > > scroll when all records are visible but I have a client who madly[/color][/color][/color]
        uses[color=blue][color=green][color=darkred]
        > > > the scroll
        > > > wheel at all times. Furthermore, it is not always immediately[/color][/color][/color]
        obvious[color=blue][color=green][color=darkred]
        > > > that all
        > > > records are visible (e.g. when there are, say 29, on display).
        > > >
        > > > The scroll bar (to the right) fills its whole space, indicating[/color][/color][/color]
        that[color=blue][color=green]
        > > all[color=darkred]
        > > > records are
        > > > visible, and therefore cannot be moved. However it is possible to[/color][/color][/color]
        use[color=blue][color=green][color=darkred]
        > > > the
        > > > arrows to scroll down (losing some records form the top) and then[/color]
        > > scroll[color=darkred]
        > > > upto
        > > > redisplay them all.
        > > >
        > > > It is also possible to use the scroll wheel to scroll down (again[/color]
        > > losing[color=darkred]
        > > > uppermost records) but when one tries to scroll back up again with[/color][/color][/color]
        the[color=blue][color=green][color=darkred]
        > > > wheel
        > > > the top record is never made visible. It is always just out of[/color][/color][/color]
        reach.[color=blue][color=green][color=darkred]
        > > > (By using
        > > > the arrow, it can be made available again)
        > > >
        > > > Why does the scroll wheel have this strange behaviour? and is[/color][/color][/color]
        there[color=blue][color=green]
        > > any[color=darkred]
        > > > way
        > > > round it? (that is without using the arrows above and below the[/color][/color][/color]
        scroll[color=blue][color=green][color=darkred]
        > > > bar)
        > > >
        > > >
        > > > *** Sent via Developersdex http://www.developersdex.com ***
        > > > Don't just participate in USENET...get rewarded for it![/color][/color][/color]

        Comment

        Working...