Enter-Key

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?
 
T

Tom van Stiphout

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
 
S

suzy

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
 
S

suzy

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
 

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