last records on continuous form

mtagliaferri

Registered User.
Local time
Today, 02:32
Joined
Jul 16, 2006
Messages
550
I have a continuous form and have the following code
Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acLast
End Sub
to show the last records on the Open Form Event, this works fine but it will only display the last record (obviously) on the entire screen which looks a bit odd, how can I change it to something in the lines go to the last 10 or 15 records so that the screen is filled up with more than just 1 record?
Thanks
 
Set a bookmark and use DAO "MovePrevious" to show several additional rows.
 
You can also navigate directly in the recordset exposed by the form . . .
Code:
Private Sub Form_Open(Cancel As Integer)
   with Me.Recordset
      .movelast
      .move -6
   end with
End Sub
 

Users who are viewing this thread

Back
Top Bottom