scroll to last record

N

NJS

Hi All.
how do I programmatically scroll to show the latest 'n' records (bottom of
page)?
Do I use the scroll method? (and how?)
thanks for your input.
 
T

Tom van Stiphout

On Sat, 17 Oct 2009 23:43:01 -0700, NJS

You can select the last record, which will then cause Access to scroll
to that record. You do this by setting the Bookmark property of the
form equal to the Bookmark property of the RecordsetClone:
with me.recordsetclone
.movelast
me.bookmark = .bookmark
end with

-Tom.
Microsoft Access MVP
 
L

loufab

Hi NJS,

I use directly the Recordset object of forms.

Me.Recordset.movelast ' for form

or

Me.Form2.Form.Recordset.MoveLast 'for sub form

see you
 
M

Marshall Barton

NJS said:
how do I programmatically scroll to show the latest 'n' records (bottom of
page)?
Do I use the scroll method? (and how?)


If your form can display at least N records, then move
backwards from the last record:

Me.Recordset.MoveLast
Me.Recordset.Move -N
 
N

NJS

Hi loufab - I fixed it by using your suggestio then moving previous 'n'
times. thanks for your help.
 
M

Marshall Barton

NJS said:
Hi loufab - I fixed it by using your suggestio then moving previous 'n'
times. thanks for your help.

Move -N
is simpler/easier/more efficient than using MovePrevious N
times.
 
N

NJS

Thanks Guys.
(if one moves last then only the last record is displayed on the form)
the move -n or move previous a number of times works well)
 

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

Top