StayAtHomeMom
Technical User
Hello,
I am using VBA code to run queries and format them off the click of a button on a form. One of my queries is a quarterly report that has many records (over 29K). When I try to run it, I get:
Run-time error '2306':
There are too many rows to output, based on the limitation specified by the output format or by Microsoft Access.
Here's the code I'm using:
DoCmd.OutputTo acQuery, "RPT302_YTD_Data", acFormatXLS, "C:\Mypathname...", False, "", 0
Workbooks.Open "C:\Mypathname..."
I also have a
DBEngine.SetOption dbMaxLocksPerFile, 35000
statement at the beginning of the subroutine.
Is there anything I can do/change to make this query run and output to Excel?
Thanks for your insight!
I am using VBA code to run queries and format them off the click of a button on a form. One of my queries is a quarterly report that has many records (over 29K). When I try to run it, I get:
Run-time error '2306':
There are too many rows to output, based on the limitation specified by the output format or by Microsoft Access.
Here's the code I'm using:
DoCmd.OutputTo acQuery, "RPT302_YTD_Data", acFormatXLS, "C:\Mypathname...", False, "", 0
Workbooks.Open "C:\Mypathname..."
I also have a
DBEngine.SetOption dbMaxLocksPerFile, 35000
statement at the beginning of the subroutine.
Is there anything I can do/change to make this query run and output to Excel?
Thanks for your insight!