Access 2007 - Limit Query to Maximum No. of Records

J

Jason

Greetings!

I have a table of 17K records and need to export all the records in
increments of 5K.

How can I tell my query to only display 1-5000, or 50001-10000 and so on?

Thanks in advance of the assist.
 
M

MGFoster

Jason said:
Greetings!

I have a table of 17K records and need to export all the records in
increments of 5K.

How can I tell my query to only display 1-5000, or 50001-10000 and so on?

Thanks in advance of the assist.


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

What I'd do is add a temporary, sequential, AutoNumber column (called
"temp_no") to the table (assuming there is NOT an AutoNumber column
already in the table). Then write a query like this:

PARAMETERS start_no Long, end_no Long;
SELECT * FROM table_name
WHERE temp_no BETWEEN start_no AND end_no

Then export that query, filling in the Parameters (1-5000, 5001-10000,
etc.) for each run.

OR

Instead of using parameter prompts, use a VBA loop to run the query for
each 5K segment.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

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

iQA/AwUBSQ+QcIechKqOuFEgEQLXtgCfXWANigeBR9OAjVio6u841sWtRnIAoLMa
Hm38kR0VR4bV2LTGWYz9DF/U
=fPu6
-----END PGP SIGNATURE-----
 
Top