How can I stop the Alt key from scrolling a subform (AC2007)

AOB

Registered User.
Local time
Today, 20:23
Joined
Sep 26, 2012
Messages
637
Hi guys,

Extension / resurrection of an old thread (here) - an issue which is really frustrating my end users (and, to be honest, myself)

The original thread describes the problem but basically, I'm finding that whenever a continuous subform is open, and the user presses the Alt key (in order to, say, Alt+Tab to a different window), the subform scrolls upward. So when they Alt+Tab back, the record they might have been looking at has scrolled away.

I need to disable this unwanted scroll

I've tried adding this code to one of my subforms (as per burrina's suggestion in the original thread)

Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If Shift = 4 Then KeyCode = 0
End Sub

...to detect if the Alt key has been pressed and, if so, cancel the keystroke. The event fires, but the subform still scrolls upward! :banghead:

This becomes really annoying, as my users will use the subforms to scroll to a particular record, then Alt+Tab to go to other applications to find out more information, then Alt+Tab back to my DB to update the record - but the record has disappeared and they have to go scrolling again.

There has to be a way of preventing this, surely??

Any suggestions very greatly appreciated!

Thanks

Al
 

Users who are viewing this thread

Back
Top Bottom