Enter-Key

  • Thread starter Thread starter suzy
  • Start date Start date
S

suzy

This field I am working on is at the end of the record of the subform. When I
hit the Enter-Key after entering this record, I would like it to open the
brand-new Record to be entered, not the next new record in the subform. Is
there a way to use the Enter-Key to go to the New Record instead of the Next
Record?
 
On Fri, 1 May 2009 12:08:02 -0700, suzy

Sure. You could write some code to accomplish this. For example in the
OnKeyDown event of that control, check for the Enter key:
If KeyCode = vbKeyReturn And Shift = 0 Then
DoCmd.GoToRecord acDataForm, Me.Name, acNewRec
End If

-Tom.
Microsoft Access MVP
 
Tom van Stiphout said:
On Fri, 1 May 2009 12:08:02 -0700, suzy

Sure. You could write some code to accomplish this. For example in the
OnKeyDown event of that control, check for the Enter key:
If KeyCode = vbKeyReturn And Shift = 0 Then
DoCmd.GoToRecord acDataForm, Me.Name, acNewRec
End If

-Tom.
Microsoft Access MVP
 
I am new at this and I don’t have any knowledge of VisualBasic Codes. If I
tried to copy and paste what you suggested, just as they are, between the
Private Sub and End If codes, I know it is not going to work. If possible, I
need additional help. Thanks
 
Back
Top