Open Form Move to last record

MarkA70

Registered User.
Local time
Yesterday, 20:34
Joined
Jan 30, 2016
Messages
43
SOLVED: Open Form Move to last record

I am trying to open a form and move to the last record. I am using this code:


Private Sub Form_Load()
If Me.RecordsetClone.RecordCount > 0 Then
Me.RecordsetClone.MoveLast
End If
End Sub


It does not move me to last record, how might it be modified?
 
Last edited:
Code:
Private Sub Form_Load()
dim rs As Dao.Recordset
set rs = Me.RecordSetClone
with rs
If Not (.BOF and .EOF) Then
.MoveLast
Me.BookMark = rs.Bookmark
End If
.Close
End With
End Sub
 
Last edited by a moderator:
another method is just to sort the form records in revere order so the first record is the latest entered.
 

Users who are viewing this thread

Back
Top Bottom