Is there a way using the DoCmd.OutputTo command to generate more than the standard 16,384 records from an Access report ?
Posted on 2006-06-21
Is there a way using the DoCmd.OutputTo command as follows
DoCmd.OutputTo acOutputReport, "rptD", acFormatXLS, ExportedFile
such that only the first 16,384 rows are sent to the first Excel worksheet and
then the next 16,384 rows get sent to a second Excel worksheet,
and then the next 16,384 rows get sent to a 3rd Excel worksheet, etc.
up to the max of 65,535 rows.
The reason I ask is because DoCmd.OutputTo will only generate 16,384 rows from an Access report.
I could do something like the following but I create subtotals and totals so I don't want to extract just the detail records:
DoCmd.OpenReport "rptD", acDesign
Reports!rptD.Filter = "LastName='Garrison'"
Reports!rptD.FilterOn = True
DoCmd.Close acReport, "rptD", acSaveYes