Display set # of records per page on form

P

Pamela

I have created a work queue form based off of a query for all of our
in-progess cases. The results may easily exceed 250 records and for easier
navigation, I'd like the best way to create page # buttons/tabs in the botton
right corner. Each page would display about 25 records and then page 2, for
instance, would display the next 25 and on and on. This should be dynamic in
that if we should only have 25 cases, it would only display a page 1
tab/button. What is the best way to achieve this?

Thanks so much!

Pamela
 
T

Tom van Stiphout

On Wed, 11 Nov 2009 20:35:01 -0800, Pamela

It probably depends on how your data is sorted. Say it is by ID. You
could select 25 rows using something like:
dim lngMaxID as long
with Me.RecordsetClone
.MoveLast
lngMaxID = !ID
end with
dim sql as string
sql = "select top 25 * from myTable
where ID > " & lngMaxID
Me.RecordSource = sql

-Tom.
Microsoft Access MVP
 
J

John W. Vinson

I have created a work queue form based off of a query for all of our
in-progess cases. The results may easily exceed 250 records and for easier
navigation, I'd like the best way to create page # buttons/tabs in the botton
right corner. Each page would display about 25 records and then page 2, for
instance, would display the next 25 and on and on. This should be dynamic in
that if we should only have 25 cases, it would only display a page 1
tab/button. What is the best way to achieve this?

Thanks so much!

Pamela

A Continuous Form sized so that 25 cases fit on the screen would do this with
no code at all.
 

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