On open, start with last entered record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone tell me how i can have access to open a form with the last entered
record (now it open in the first record i entered)??
 
You can use the Load event of the form to move to the last record in the
form. (Is that the last entered one?)

Private Sub Form_Load()
If Not Me.NewRecord Then
RunCommand acCmdRecordsGoToLast
End If
End Sub

If you want to go to the record that was current last time you closed the
form down, see:
Return to the same record next time form is opened
at:
http://allenbrowne.com/ser-18.html
 
PHa58 said:
Can anyone tell me how i can have access to open a form with the last
entered record (now it open in the first record i entered)??

First off you should decide if this is a good idea because it causes a lot of
data to be pulled. If you are running over a network with multiple users you
should adopt the practice of always opening forms either to an empty record (for
new insertions) or only to a specific record that the user has asked for ahead
of time.

Anyway... in the Open event of the form...

DoCmd.RunCommand acCmdRecordsGoToLast
 
Back
Top