Query or Macro to break large tbl rcds into smaller tbls to export to Excel

  • Thread starter Tiffany via AccessMonster.com
  • Start date
T

Tiffany via AccessMonster.com

I have a CSV file that has 1,286,881 records on it. I need to put them in
an
Excel file. Excel will only take 65553 records. So, I imported the CSV into
Access just fine, but how do I run a query that will transfer a 65,000
number of records each o Excel?

I need to tell it to send 65,000 to Excel worksheet1 , then send the next 65,
000 to Excel worksheet2, etc, etc,.. up to 19 - 20 worksheets within one(1)
Excel Workbook.

I'm open to another way of doing this...(running a query that will create
many smaller tables, etc..

Please help,

Thanks,
Tiff
 
G

Guest

1,286,881 divided by 65553 equal 19.63115342 so it would take 20 loops. A
macro can only call it self 11 times. You could have several macros that in
turn call the next one.

1 – Make Table-X query selecting top 65550 records and inserting the key
field.
2- Export select query joined with the Table-X 65550 records. You want to
make sure that it is the same 65550 records.
3- Delete query for csv table records equal to those in Table-X.
4- Delete all records in Table-X.
5- Append query selecting top 65550 records to Table-X.
6- Repeat 2 through 5 19 more 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