Help With Moving To the First Field When Adding Subsequent New Records

  • Thread starter Thread starter ridgerunner
  • Start date Start date
R

ridgerunner

I have a form that works great when the first new record is added to a
database. After adding the first new record, when the "add new record"
asterisk is clicked at the bottom of the screen, the cursor remains in the
last field of the last record added instead of moving to the first field of
the new record. Can someone please tell me how to make the cursor move the
to the first field of the new record?
 
Use the Current event of the form.

Something like this:
Private Sub Form_Current()
If Me.NewRecord Then
Me.[NameOfSomeTextBoxHere].SetFocus
End If
End Sub
 
Thanks so much. This is exactly what I needed.

Allen Browne said:
Use the Current event of the form.

Something like this:
Private Sub Form_Current()
If Me.NewRecord Then
Me.[NameOfSomeTextBoxHere].SetFocus
End If
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

ridgerunner said:
I have a form that works great when the first new record is added to a
database. After adding the first new record, when the "add new record"
asterisk is clicked at the bottom of the screen, the cursor remains in the
last field of the last record added instead of moving to the first field of
the new record. Can someone please tell me how to make the cursor move the
to the first field of the new record?
 
Back
Top