Link to home
Start Free TrialLog in
Avatar of Derek Brown
Derek BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Stop user moving to new records in subform PageDown

I have this that works great for keeping one record only in a subform.

If KeyCode = vbKeyPageUp Or KeyCode = vbKeyPageDown Then
    KeyCode = 0
End If

To my horror rolling the mouse scroller moves straight to the next records.

In my app that is a big problem. How do I stop it.
Avatar of Gozreh
Gozreh
Flag of United States of America image

Are you looking for solution to disable the mouse scroll in subform ?
look here  https://www.experts-exchange.com/questions/23662702/Disable-Mouse-Wheel-Scroll.html
Set the Cycle property of the form (Properties dialog - Other Tab) to Current Record.
Avatar of Derek Brown

ASKER

Hi All

Setting the forms Cycle property to current record does not work with any mouse I have tried. Lebans system does not compile in 2002 and I cannot figure out why that is,

I'm still stuck. Any more suggestions?

Derek
Which version of access are you using ? I test the Lebans with 2010 and it worked.
Did you download from Lebans the A2KMouseWheelHookVer22 file ? what error did you get ?
Setting the forms Cycle property to current record does not work with any mouse I have tried.
We must live in different dimensions.  It works for me.  When you have a row selected in a subform, scrolling allows you to move the list up and down but focus stays on the selected record.  However, Page up and down WILL move focus to a different record.
I am on version 2002. My packaging and security software are linked to this version so an upgrade would be very inconvenient and expensive.

My subforms are in single form mode. Perhaps that is the difference. But this problem applies to all single forms in my app and all have the cycle property set to current record
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks

Derek