Forum Discussion
Tony2021
Sep 30, 2022Steel Contributor
DoCmd.GoToRecord , , acLast
Hello, how can I go modify the below to go to the next to last record? For example, if the last record was 10, I would want to go to 9. I put a -1 at the end but that didnt work.
Private Sub Form_Load()
DoCmd.GoToRecord , , acLast
End Sub
thank you
You could try
Private Sub Form_Load()
DoCmd.GoToRecord , , acLast
Docmd.GoToRecord ,, acPrevious
End Sub
- George_HepworthSilver Contributor
You could try
Private Sub Form_Load()
DoCmd.GoToRecord , , acLast
Docmd.GoToRecord ,, acPrevious
End Sub- Tony2021Steel Contributorahh... perfect. thank you!