By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

Scroll wheel mystery

P: n/a
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!
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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*****@nowhere.com> wrote in message
news:40*********************@news.frii.net...
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!


Nov 12 '05 #2

P: n/a
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" <Fo****************************************@linval id.com> wrote in message news:<5o*********************@ursa-nb00s0.nbnet.nb.ca>...
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*****@nowhere.com> wrote in message
news:40*********************@news.frii.net...
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!

Nov 12 '05 #3

P: n/a
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:
http://www.lebans.com/mousewheelonoff.htm
MouseWheelHook97.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. MouseWheelHookA2K.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
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Bob Bergman" <te*******@bellsouth.net> wrote in message
news:a6**************************@posting.google.c om...
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"

<Fo****************************************@linval id.com> wrote in
message news:<5o*********************@ursa-nb00s0.nbnet.nb.ca>...
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*****@nowhere.com> wrote in message
news:40*********************@news.frii.net...
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!


Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.