Reputation: 23
When I type a value into a cell in an Access datasheet, I would like the currently selected cell to move down one as soon as a value is entered, for example I type the letter "N" into a cell and then the selected cell marker moves down so that I can enter "F" into the cell below without having to press the down or enter button. Is this possible? I have tried using the macros "On key press, go to record next" and also "After update, go to record next" on the field that is in the form (it is a split form with the table underneath and the currently selected record's information above) but this doesn't work. I have googled about it but it all talks about changing what pressing enter does rather than this. Any help would be appreciated. Thanks.
Upvotes: 0
Views: 4432
Reputation: 23
I solved this by playing around in the macro settings, it turned out that I had to use OnChange GotoRecord Next. If anyone needs this in future, I have attached a screenshot. Macro to move to next record when value entered into a cell.
Upvotes: 0
Reputation: 32632
I assume you mean in a form in datasheet mode. If so, you can use this answer:
Private Sub Controlname_KeyPress(KeyAscii As Integer)
Controlname = Chr(KeyAscii)
DoCmd.GoToRecord , , acNext
End Sub
Upvotes: 2