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!

Scroll wheel driving me nuts! 3

Status
Not open for further replies.

andrewvanbeck

Programmer
Jul 4, 2001
59
0
0
GB
Hello all,

I have an annoying problem with Access, when I am in a form, and I move the scroll wheel on the mouse, Access cycles through the records. I know this may be minor, but the problem is my databases are used by a lot of people without much computing experience and people expect the scroll wheel to scroll the form, not the records. Is there a way to change how the scroll wheel works with Access?

Thanks in advance,

Andrew.
 
You would need to ensure that the form has the focus. I am not sure if this will work as I have not tested it, but if the setfocus method is available to forms, then this may cure the problem. Have fun! :eek:)

Alex Middleton
 
I would suggest that you change the form Form Property 'Cycle' which can be found under ther 'Other' Tab to Current Record. This would limit them to the record displayed.

HTH
Lloyd Gozzett
Process Developer
 
Thanks anyway guys but neither of those worked. I have a stop-gap solution which is that I return to the correct record after the user moves.

This is weird though, excel lets you change the way the scroll wheel works, you can use it to zoom as well as scroll, so why not Access. Perhaps this is just an oversight on Microsofts part, but it's a real pain when your working away on a form then suddenly your on a different record because you accidently touched the scroll wheel.


Thanks again.

Andrew.
 
MS has an article in the Knowledge Base for 2K, it talks about using VB6 to create an ActiveX dll. The article is Q278379.
ACC2000:How to Detect and Prevent the Mouse Wheel from Scrolling through Records in a Form.

It also shows a method for using VBA, but "strongly" suggests against doing so.

Can this be used in 97 ?, it doesn't state that it "can't"

PaulF
 
Thanks Paul,

I use Access 2000, but unfortunately my cheap-ass bosses won't buy me VB6, I only have VB4.

Thanks anyway though, I might try and find someone who has VB6 and get them to compile the code for me.

Andrew.
 
I only have Access 97 and it doesnt seem to recognise (comes up with the error 'expression required)the "AddressOf WindowProc" part of the code. Anyone know why?

Kind Regards

Liam Corkhill
 
Perhaps 'AddressOf WindowProc' is only available on Access 2000.

Andrew.
 
AddressOf is a Windows Callback operator that is available on VB5 and after, this is according to an article in a book on Windows API calls by Dan Appleman. So, if Liam used VB5 or VB6 to make the DLL, then the problem may must be something else. The "Expression Required" error message, tends to make me believe he left out a portion of the code. He should recheck the code he put into the code window for the form he is using to test this from. I personallly, have not attempted this process, so all of the above is purely a "shot in the dark".

PaulF
 
You can stop the wheel mouse by either using MS subclassing solution which does work and is complete code, , or you can try this which seems to work - leave the scroll bar propery set to either both or vertical only and the form will not change records. If you have not noticed the records never scroll if there is a sub-form with scroll a vertical scroll bar. If you do not have VB and want the dll verision email me and i will send it to you

Blaine
blainedaytime@worldinfomall.com
 
Has anyone had the problem that when a user uses the scroll wheel records are added to the database? On one DB, if a user uses the wheel, nearly 5000 blank records get added to the table. Since it is a DB in limited use (only 9 people have to remember not to use scroll), it's not too big a deal, but I would love to get it to stop. Any clues?
 
You have the same problem as me!, if you are scrolling down you are moving to a new record everytime.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top