Page Feeds using Access 2000 Query

D

djbiehl

I have a database where one table has over 400,000 records. I am displaying
these records in a ListBox control on a form using a query for the RowSource.
Because there are a lot of records, and a relationship or 2 in the query, the
control takes a while to load due to the query run time. My supervisor
suggested that I try using page feeds so that only parts of the data need to
load at a time, and the user can sift through the pages until the user finds
the desired data. (Much like Google dispays seach results 1-10, and then you
can go to the next page to see results 11-20, 21-30 etc. Note: My supervisor
is a web-programmer and doesn't know Access so he doesn't know either)
However, to the best of my ability I cannot figure out how to make the query
return a certain set of records. In other versions of SQL you would use the
LIMIT command (ie: LIMIT 0,10 would return the first 10 records, LIMIT 10,20
would return the 10th to 20th record so on and so forth) Jet-SQL has the TOP
predicate, but that will only return the first "x" number of results. I need
to access the records after that as well. Is there any way to pull records
based on record numbers using a query?
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You could use a Recordset to get the data from the table and then feed
the data to the ListBox X records at a time. Have a CommandButton that
allows the user to get the next X records into the List Box. Use a
Value List instead of a query/table for the List Box's RowSourceType.
Load the RowSource using VBA in the OnClick event of the CommandButton.
Use the AbsolutePosition property of the Recordset to get the X records.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRICKq4echKqOuFEgEQIbbgCgxkKGxQ7bibfCyMSdLX0HDTP9zdUAnRVj
O9lAc6uvEu4up+YV7WJpa9Kb
=jVVN
-----END PGP SIGNATURE-----
 

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