Display set # of records per page on form

  • Thread starter Thread starter Pamela
  • Start date Start date
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
 
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
 
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.
 
Back
Top