essaytee
Need a good one-liner.
- Local time
- Today, 12:30
- Joined
- Oct 20, 2008
- Messages
- 512
Continuous Form - show last record at bottom of list - Access 2010
How do I go to the last record and show that last record at the bottom of a continuous form list (without having to click the vertical scroll bar to force all the records above to appear)? In the process, the last record is to have the focus.
It seems by default when navigating to the last record on a continuous form, the record is shown at the top of the list, it does have the focus but the records above not displayed. I want the last record to be displayed, and have the focus, at the bottom of the list.
Here is a code snippet that achieves most of my requirement, except for the last record having the focus.
Under the above method, the last (or latest) records are shown, but the record at the top of the list has the focus.
I am aware of reversing the sort order, but that is not an option.
I'm open to any suggestions.
ps. Yeah, Recordset & RecordsetClone used, neither here or there, just a remnant of testing every possible scenario.
How do I go to the last record and show that last record at the bottom of a continuous form list (without having to click the vertical scroll bar to force all the records above to appear)? In the process, the last record is to have the focus.
It seems by default when navigating to the last record on a continuous form, the record is shown at the top of the list, it does have the focus but the records above not displayed. I want the last record to be displayed, and have the focus, at the bottom of the list.
Here is a code snippet that achieves most of my requirement, except for the last record having the focus.
Code:
Sub GoToLastRecord()
Dim rst As Recordset
Set rst = Me.RecordsetClone
If rst.RecordCount <> 0 Then
rst.MoveLast
rst.Move -19
Me.Bookmark = rst.Bookmark
End If
End Sub
Under the above method, the last (or latest) records are shown, but the record at the top of the list has the focus.
I am aware of reversing the sort order, but that is not an option.
I'm open to any suggestions.
ps. Yeah, Recordset & RecordsetClone used, neither here or there, just a remnant of testing every possible scenario.
Last edited: