...in a continous form using the keyboard arrow keys just like in a datasheet? Currently my users are having to click on each row of the field they are editing and there are tens of them at a time. Thanks.
Paging up and down would not work in this scenario, the users are currently using the scroll mouse but it is a slightly cumbersome solution since their hands have to leave the keyboard alot.
This is the way its set up, there is rows 1-100... and 12 columns for Jan to Dec. For each of these rows, they need to fill data for just one month(column) at a time. So say they place the cursor in the jan column(since info for feb etc is not available yet), they need to populate this column on every row, it would be nice if they could use the arrow up and down keys to go from one row to the next without leaving this column and without their hands leaving the keyboard.
I just wondered whether I missed a feature that could be turned on for continous forms to allow for this or whether this could be achieved through code.
Paste this into your form's module:
Private Function UpOrDown(intKeyCode As Integer)
On Error Resume Next
If intKeyCode = 40 Then
DoCmd.GoToRecord , , acNext
ElseIf intKeyCode = 38 Then
DoCmd.GoToRecord , , acPrevious
End If
End Function
Paste this into the KeyDown event of ALL the text boxes that you want this to work on:
UpOrDown (KeyCode)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.