Continuous Form Navigation: SHIFT and 9 not working (1 Viewer)

XelaIrodavlas

Registered User.
Local time
Today, 17:00
Joined
Oct 26, 2012
Messages
174
Hello all,

I'm having an issue with some code designed to navigate a continuous form - it's your typical arrow key navvi, up goes up a record, right key tabs across, etc. All was working fine, when, inexplicably, the keycode for left stopped working. Here's the code:

Code:
If KeyCode = 37 Then
KeyCode = Shift And 9
Exit Sub
End If

I have tested this in other forms and it works perfectly - and the other keys for up, down, right (KeyCode = 9) all work fine. Preview Keys is on and the event triggers in the Form's KeyDown event.
I checked the new keycode value on the next line after changing it (using Msgbox KeyCode), and it reads as 0!

Anyone experienced anything like this before? There must be something else at work here, but I cant think of what...

Thanks ^^
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 00:00
Joined
May 7, 2009
Messages
19,242
In ascii or on your keyboard, what is the key for shft-9? You put the value on there, instead of some pseudo code.
 

XelaIrodavlas

Registered User.
Local time
Today, 17:00
Joined
Oct 26, 2012
Messages
174
Thanks for the reply Arnelgp, I'm not entirely sure what you mean tbh as far as I'm aware there's no ASCII for shift. However you put me on the right train of thought and I've substituted the code for SendKeys "+[tab]". It may be less efficient in terms of processing power (I'm guessing) but shouldn't be noticeable, as long as it works i'm happy!

Still not sure why it stopped working, but for now I'll count my blessings.

Thanks a bunch :)
 

Users who are viewing this thread

Top Bottom