Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stopping record navigation via mouse scroll wheel? 2

Status
Not open for further replies.

luterguy

Programmer
Jan 30, 2001
4
0
0
US

Does anyone have information on controlling the scroll wheel on a mouse? I have a form which is setup to only show the current record, etc. However, when a user scrolls the mouse it navigates through the record. I do not want this. I want the user to be able to scroll the form (if needed) but not the records. I can trap PAGE UP and PAGE DOWN, but how do you trap the Mouse Scroll?

I have not been able to find any information on this and would appreciate any help.

B
 
Did you try turning the Scroll Bars off in the property settings of you form?
 
I don't know why I can't get this to post, but I will try again. Did you try changing the Scroll Bar settings in the Form's design? Go to the Form's property sheet and set the Scroll Bar setting to "Neither"?
 
I believe that even without scroll bars there is a problem. For example, if a user uses the mouse scroll wheel then it will scroll though the records in the database. This can be a nice feature or it could be a nightmare. In this case the customer wants a large form (needs the scroll bars). The problem is when a user scrolls to the bottom of the form the records start cycling and the user may edit the wrong record.
Solutions are available to stop PageUp and PageDown, but I have not seen anyone address this. There is an event for current record for which I could do much coding to keep the user on the current record and force them through my own navagation buttons, however there has to be a better way.
I am hoping someone may have information on this.

Thanks in advance,
Brian
 
Hi Brian,

I am having this same problem. Did you ever come to an easy solution for the mouse wheel scrolling to different records within the form. I also would like for the mouse wheel to scroll up and down on the form but not change records.

Thanks,
Tim Szrejter
 
I have not gotten any more information. I have done some things to help with the situation, however to me this is a serious issue with Access.
 
I've seen the SR-2 resolution on the Microsoft Knowledgebase and we are on SR-2 and still having the problem. From what I read in that it mentioned the scrolling of a subform, and our form is just composed of one form with no subforms.
 
I have not tried this yet but I found this in another newsgroup. Someone solved it by setting the Record
Locks value of the form in question to Edited Record.
 
Hi!

I'm not sure if it works, but have you tried changing the "Cycle" property of the form ("Other"-Category) to Current Record or mayby the Allow Addition property to No (should work if you're just showing one record)?

Roy-Vidar

 
I have the same issue.
I'm using Access97 with SR-2.
My form should only show one record.

However, it seems that no matter how I set up the form...the mouse wheel will only scroll through the records.

Biggest issue: The form has some required fields. The user is in the middle of editing some information or adding a record. The user inadvertally moves the mouse wheel. Access tries to goto a new record or a previous record. This produces an error when the required fields are not set.

-doug

 
I am having the same issue with Access 2002. On the form's MouseWheel event, you can do Cancel = True and it will prevent it from scrolling through the records. But I'm still lost as to how to scroll through a single FORM.
 
MouseWheel event??? Where is this? Holy tek-tips batman!:-0
 
I use to have the problem as well if you set the form properties to data entry "yes" it will not allow the users to scroll with the wheel mouse button.
 
I'm having this problem as well. If I find a solution, which means that you can cycle through the forms then I'll post it in the FAQ's section under a new heading.

Give me some time though, because I'm going to have to code this one in VBA. Microsoft's help site mentioned above says its impossible, so it'll take at least a week!

Dr.D
 
Folks - I think you are coming at this the wrong way.

The issue is not how to control what the user does, but how to control how the records work.

If you have a form which will only look at a single record, then pre-define that record in the form's underlying query before it is opened. This way there are no other records for those dozy users to get to no matter how they try - mouse wheel, page up whatever.

I usually use a hidden "filter form" where i can store all my form parameters. Its simply a matter of setting the filter form parameter properties before the main form is opened.

This has a potentially huge advantage that you are not using unnecessary resources by calling unneeded records across the network...
 
EnidTheDog,

That's fine if you only want to display one record. If you want to display more than one then there is no way within Access to stop the user from scrolling through the records using the mouse wheel. The only way to do this is to use Microsofts solution which is contained in the following KB article.


Dermot
 
Laos - Luterguy explained in the first post that he has already written code to prevent use of page up and page down. I think its a safe assumption that this is a single record form :)

Your point is still valid - I was just trying to explain that if you need only one record - then call only one record!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top