Bypassing fields in a form

G

Guest

I have a Tabular form with three columns. When I data enter into the form I
would like to click in one column type my data and then touch Tab or down
arrow on keyboard and move down the column. Currently I have to type data
and then touch Tab on the keyboard three times to get to my next desired cell
in the form.

I tried changing the Tab Order but that didn't help.

Any help would be appreciated.
 
A

Albert D. Kallal

I place the following code in a the forms key down event.

You have to set the forms keypreview = yes


Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

' key hand

Select Case KeyCode

Case vbKeyUp
KeyCode = 0
On Error Resume Next
DoCmd.GoToRecord acActiveDataObject, , acPrevious

Case vbKeyDown
KeyCode = 0
On Error Resume Next
DoCmd.GoToRecord acActiveDataObject, , acNext

End Select

End Sub

The above code will thus make your continues form behave much like
Excel...and up/down arrow keys will move as expected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top