Prevent mouse scroll to new record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I prevent mouse scrolling in a (single) form so that the user does
not inadvertently scroll to a new record? Of course, scrolling needs to
continue to be available in IE, etc. if the user minimizes the Access
application to do something else, so I cannot simply disable mouse scrolling
in the Windows environment; it must be specific to Access.

Can I just put something in the MouseWheel event on each affected form to
prevent scrolling?
 
Brian, Here is 3 other ways to prevent this from happening wthout using any
3rd party dll's. Also if yoiu do it this way then you can move your database
from workstation to workstation without having to make sure a dll is moved
with it.

1) use 2 forms. Create your query or SQL to display a short detail list of
all records in your query or SQL. This is best done in the Continous form
view. Add a button to this form. I usually make the button the size of the
form and cover all details. then make the button transpart so the details
under it can be seen. Use double click event to open only the record that
you selected in form 2. This one would display all the data you need to see.
Place a close button on Form2 to close it and then you return to form1 for
your next record

Advantages here is you can pick and choose which records to view and view in
the order you like. Also the mouse wheel on both forms will scroll the pages
up and down with out advancing to any records.

2) if you need to view all the records in order then we use the same
concept. Only form1 is in the background and only has the primary ID field
used to query on. Also Form one is set to Single form not Continous. Form
2 will load all data that is related to the primary ID file on Form1. When
you need to go to the next record. Create a next record button on form2.
This button would then close form2. advance form 1 to the next record an then
reopen form2.

Advantage here is your users will only see one form and you can controll the
order in which they are displayed.

Both of these options don't require a 3rd party dll to must be moved to each
machine that you have this issue with since in either case you only have one
recorded open on form2. One last note. on Form2 set the properties to not
allow additions.

oh yeah.. option 3. don't use a mouse with a wheel on it.
 
Back
Top