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
 

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

Similar Threads

Going to first record 0
Opening the Most recent record 3
Validation in child form 1
On click add record 1
Separate Form 0
Increment question 9
Records 1
Open a sub form too last viewed record 3

Back
Top