I have a data entry form with a subform bound to a (temporary) table. Default Tab and Enter behavior moves focus one field to the right. Default Shift-Tab moves focus one to the left. The code below is my attempt to force those defaults to move up and down one record in same column instead. However, since the user is holding down the Shift key, SendKeys {"UpArrow"} is really Shift-[SendKeys {"UpArrow"} ], and by default, this causes the selection to expand upwards. How can I instead get focus to go up one record when Shift-Tab is pressed?
Daniel Dillon
O o . (<--- brain shrinking at rate shown.)
Code:
Private Sub Text50_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyTab
Select Case Shift
Case 0
SendKeys "{down}", True
Case acShiftMask
SendKeys "{up}" ', True
Case Else
'ignore
End Select
Case vbKeyReturn
Select Case Shift
Case 0
SendKeys "{down}", True
Case Else
'ignore
End Select
Case Else
'Ignore
End Select
End Sub
Daniel Dillon
O o . (<--- brain shrinking at rate shown.)