Alt key scrolls subform to top? (AC2007)

AOB

Registered User.
Local time
Today, 03:13
Joined
Sep 26, 2012
Messages
637
Amazed I've never noticed this behaviour before today...

It seems that if I have a continuous subform open and scroll down through the records, then hit Alt, the subform immediately scrolls back to the top again?

I only noticed this today when I scrolled to a particular record, then wanted to use Alt+Tab to switch to a different window. When I Alt+Tab'd back to my DB, the subform had scrolled back to the top and I had to scroll again to find my record. It was only then that I realised the auto-scroll was happening as soon as I hit the Alt key.

Anybody know how to disable this behaviour as I use Alt+Tab pretty frequently (as do my users, more importantly) and it will get pretty annoying pretty quickly if the subform keeps reverting to the top?

Thanks!

Al
 
Thanks burrina

But where does this code reside? Which event(s)? And on the main form or the subform?

And on every subform / mainform in the whole DB? (There are many)

I was hoping there would be a way of simply disabling shortcut keys entirely, or better still just this specific one (which seems remarkably easy to fire accidentally, given that it is only one button on the keyboard, and one which is used quite frequently)

Rather than having to trap it with VBA and override the command every time. Let me tell you, that function is going to get some work, Alt+Tab is very popular where I work :rolleyes:

Has nobody else ever come across this / found it extremely annoying? :mad:
 
You could of course write a module. However, the code goes on the subform on the KeyDownEvent.

Set Key Preview to Yes.
 
Hey burrina,

Sorry to resurrect an old thread but I've tried using the above to no avail?

The event fires but the value for KeyCode which is passed when I hit the Alt key is 18

vbKeyReturn enumerates to 13

So resetting the KeyCode never occurs and the subform still scrolls back to the top

(Got to be honest, I have no idea what exactly is going on here, this is just purely from watching the debugger)

Long & short is - pressing the Alt key still scrolls the subform back to the top, which I'm trying to prevent.

Any suggestions?

Thanks!

Al
 

Users who are viewing this thread

Back
Top Bottom