Mouse wheel

L

.Len B

I have an app that uses a subform to collect data. It has several
data fields which include a couple of tall (multi-line) text boxes
and a check box called chkOk2Save and defaults to No.

I use the subform's BeforeUpdate event to validate data and ensure
that the user has /authorised/ the info. It's been working fine
for a while now but I recently had feedback from one user. She says
that she often has occasion to scroll one of the tall text boxes and
tries to use the mouse wheel rather than the vertical scroll bar.
Using the wheel triggers the data validation code just as if she had
clicked outside the subform.

What is happening? Could the wheel be generating Tab or Ctl+Tabs?
How could I trap the wheel and perform a scroll for her?

Further down the main form is another locked subform (continuous)
used to view previously entered records for this parent. Could I
perhaps capture the wheel and scroll the second subform's records?
Users cannot use this form's scroll bar as clicking outside the
first subform triggers a save attempt. If not, is there another
way I can perform a scroll of subform two from within subform one?

TIA
 
L

.Len B

| The MouseWheel is attempting to move to the next or to a new record,
which is
| triggering the FormBeforeUpdate event and hence your validation code.
To
| prevent this, you'll need to "lock" the MouseWheel.
|
| If you're running Access 2007/2010, you already have a function that
| addresses this issue! Just check with Help.
|
| For all other versions, you'll need some outside help. A gentleman by
the
| name of Stephen Lebans has a sample database that does this and it can
be
| downloaded at:
|
| http://www.lebans.com/mousewheelonoff.htm
|
| --
| There's ALWAYS more than one way to skin a cat!
|
| Answers/posts based on Access 2000/2003
|
|
|

Thanks Linq
Seems like what I need.
 

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