Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Docmd.OutputTo problem

Status
Not open for further replies.

sabavno

Programmer
Jul 25, 2002
381
CA
Hi,

I need to output the table (22000 records) to excel spreadsheet. When I use the following code

DoCmd.OutputTo acOutputTable, "tblAutoPassExport", acFormatXLS

I receive the error message saying that 'Too many records to output'.

Is there a way around this limitation?

I'll appreciate your help

THanks.
 
Hi,
What version of Access and Excel are you using? This might not be an Access limitation. Excel 95 was limited to 16,000 rows... (I believe) Kyle
 
This was kind of obscure to find but check out


Short version is Access defaults exporting to Excel 5.0 (for 'backward compatibility') which has a maximum record limit of 16354 (subtract one for headers... Kb didn't mention that but I played before I asked freeanswers.com the right answer). The workaround is to import from Access in Excel.

Personally, I'd put my money on a .CSV file (text comma seaparated values).

And I thought the MaxLocksPerFile Registry hack was a pain in the butt. [noevil]
 
Why not use the docmd.transferspreadsheet function? It lets you choose the version of Excel to "export" to.
 
Dolt! You would have thought Transferspreadsheet would have been in the KB. Or wait it is an MS KB article <sigh>.

Anyway, good thinking WillaD.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top