jay,
Two possibilities here,
One, try the Application.SetOption "ArrowKeyBehaviour" (I forgot the value for NextRecord, try 0, 1, 2 etc.)
Or...
Private Sub SomeField_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next 'Ignore the "Can't go to record" error, just let user figure it out.
If KeyCode = 40 Then 'down arrow
DoCmd.GoToRecord acActiveDataObject, , acNext
ElseIf KeyCode = 38 Then 'Up arrow
DoCmd.GoToRecord acActiveDataObject, , acPrevious
End If
End Sub
If you have many, many fields, and you want to Generate this code, do this:
***** NOTE--this is a good timesaver for all sorts of code
***** This generates an EventProc for all selected controls on form
***** When done, Copy from the Debug window and paste into the form module
Dim f As Form, i As Integer, c As Control
'open the form, it can be in design view if you want
DoCmd.OpenForm "frmyardageEntry" 'Put your form name here
Set f = Forms!frmYardageEntry
For Each c In f
If TypeOf c Is TextBox Or TypeOf c Is ComboBox Then
If c.Section = 0 Then 'if detail
Debug.Print "Private Sub " & c.Name & "_KeyDown(KeyCode As Integer, Shift As Integer)"
Debug.Print "On Error Resume Next "
Debug.Print "If KeyCode = 40 Then 'down arrow"
Debug.Print " DoCmd.GoToRecord acActivedataobject, , acNext"
Debug.Print "ElseIf KeyCode = 38 Then 'Up arrow"
Debug.Print " DoCmd.GoToRecord acActivedataobject, , acPrevious"
'Debug.Print "Else"
Debug.Print "End if"
Debug.Print "End Sub "
'Debug.Print " "
End If
End If
Next c
--Jim