Number of rows iin a query exceeds 65,000 allowed by Access (1 Viewer)

Alika

Registered User.
Local time
Today, 04:22
Joined
Mar 31, 2004
Messages
22
Access Front-end proceedes SQL Server back-end data. Pass-through query brings up more then 350,000 records that needs to be exported to Excel.
To output the result i do:
DoCmd.OutputTo acOutputQuery, "sp_PassThroughResult", "MicrosoftExcelBiff5(*.xls)", strDirectory, False, "", 0

An MS Access message I get is:
You selected more records than can be copied onto the Clipboard at one time.
Divide the records into two or more groups, and then coy and paste one group at a time.
The maximum number of records you can paste at one time is approximately 65,000.
And another message says:
There are too many rows to output, based on the limitation specified by the output format or by Microsoft Access.

What should I do to export the data? any idea?
Thank you in advance.
 

pdx_man

Just trying to help
Local time
Today, 04:22
Joined
Jan 23, 2001
Messages
1,347
This is a restriction of Excel, not Access. If you go to an Excel Workbook, and do a Ctrl + Down Arrow, you will see it's limitations. You need to partition your data down. Using your primary keys, put in ranges. So, for instance, if, say Invoice_ID was your primary key, then for the criteria, you would need to have, say, Between 1 and 65,000. Then for the next run of the query, have Between 65,001 and 130,000 ...

Excel does have limitations ...
 

Alika

Registered User.
Local time
Today, 04:22
Joined
Mar 31, 2004
Messages
22
pdx_man said:
This is a restriction of Excel, not Access. .

Thank you man
 

Users who are viewing this thread

Top Bottom