Pagination on Sub-Form

P

phenderson

Hi,

I've got a continous sub-form that displays a large amount of records
and was hoping to use some sort of pagination (i.e. view 20 records at
a time). Any ideas on how to get started on this? Thanks!
 
M

Marshall Barton

phenderson said:
I've got a continous sub-form that displays a large amount of records
and was hoping to use some sort of pagination (i.e. view 20 records at
a time). Any ideas on how to get started on this? Thanks!


Just make the subform control tall enough to display 20
records? Or is there more to your question?

Using the Page Up/Down keys or clicking in the scroll bar
will scroll a "page" at a time.
 
P

phenderson

What I'm actually looking to do is to only load 20 records at a time,
then when the user presses "Next 20 records" the form will reload with
the next 20 sequential records.
 
M

Marshall Barton

To do that, your records need to have one or more fields
that can be used to sort them in a unique order. With that,
you can use a query (with a subquery) to calculate a
sequence number. Then you can use code to construct a WHERE
clause that selects the next or previous "page" of records.

Note that you are designing a rather unusual approach to a
user interface. Isn't there a more intellegent way to
filter the data to a small number records that pertain to
the task at hand?
 
P

phenderson

I've thought about that, but what I'm looking for is a way to filter
the data without user intervention. Also, the pagination method is
becoming more and more common, especially among online web
applications. I thought this might give the user a familiar interface
while limiting the number of returned records. Thanks for the help!

Marshall said:
To do that, your records need to have one or more fields
that can be used to sort them in a unique order. With that,
you can use a query (with a subquery) to calculate a
sequence number. Then you can use code to construct a WHERE
clause that selects the next or previous "page" of records.

Note that you are designing a rather unusual approach to a
user interface. Isn't there a more intellegent way to
filter the data to a small number records that pertain to
the task at hand?
--
Marsh
MVP [MS Access]

What I'm actually looking to do is to only load 20 records at a time,
then when the user presses "Next 20 records" the form will reload with
the next 20 sequential records.
 
G

Guest

although this is far from "filtering the data" there's a nice write-up
starting on pgae 559 of "Running Access 2000" by John Viescas that talks
about setting a form with Cycle set to Current page and exactly the right
height and page breaks set so that the page up and page down keys look like
they move you to the next set of records. This does require fixed size for
each record for smooth action.
--
Twas


phenderson said:
I've thought about that, but what I'm looking for is a way to filter
the data without user intervention. Also, the pagination method is
becoming more and more common, especially among online web
applications. I thought this might give the user a familiar interface
while limiting the number of returned records. Thanks for the help!

Marshall said:
To do that, your records need to have one or more fields
that can be used to sort them in a unique order. With that,
you can use a query (with a subquery) to calculate a
sequence number. Then you can use code to construct a WHERE
clause that selects the next or previous "page" of records.

Note that you are designing a rather unusual approach to a
user interface. Isn't there a more intellegent way to
filter the data to a small number records that pertain to
the task at hand?
--
Marsh
MVP [MS Access]

What I'm actually looking to do is to only load 20 records at a time,
then when the user presses "Next 20 records" the form will reload with
the next 20 sequential records.


Marshall Barton wrote:
phenderson wrote:

I've got a continous sub-form that displays a large amount of records
and was hoping to use some sort of pagination (i.e. view 20 records at
a time). Any ideas on how to get started on this? Thanks!


Just make the subform control tall enough to display 20
records? Or is there more to your question?

Using the Page Up/Down keys or clicking in the scroll bar
will scroll a "page" at a time.
 

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