Move Up/Down (not Left to Right) with Up/Down Keys

ErikRP

Registered User.
Local time
Today, 15:35
Joined
Nov 16, 2001
Messages
72
Is it possible to (painlessly) allow users to have full control over their cursor keys? I have a few users who are very used to Excel and find it awkward having to shift between the mouse and the keyboard. They would like to be able to use the up and down arrow keys and have the cursor move up and down rather than zipping across the fields left to right.

Thanks!

[This message has been edited by ErikRP (edited 05-01-2002).]
 
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
On Error GoTo Form_KeyDown_Err
Select Case KeyCode
Case vbKeyDown
DoCmd.GoToRecord Record:=acNext
KeyCode = 0
Case vbKeyUp
DoCmd.GoToRecord Record:=acPrevious
KeyCode = 0
Case Else

End Select

Form_KeyDown_Exit:
Exit Sub

Form_KeyDown_Err:
Select Case Err.Number
Case adhcErrInvalidRow
KeyCode = 0
Case Else
MsgBox "Error: " & Err.Description & _
" (" & Err.Number & ")"
End Select
Resume Form_KeyDown_Exit
End Sub
 
Thanks Rich, I'll give that a shot and see how it works. I assume I would need to set this on each form?
 
I tried that code on a form and it didn't work - the cursor up/down keys just moved horizontally.

I tried to compile the code and I had a Variable not defined error on "adhcErrInvalidrow". Does it make a difference if I am using Access 97?

[This message has been edited by ErikRP (edited 05-06-2002).]
 

Users who are viewing this thread

Back
Top Bottom