473,378 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Exporting large query (over 66K records) from Access 2007 to Excel 2007

newnewbie
Hi,

Short version: trying to export more than 65K of data from Access 2007 into Excel 2007 (important) through VBA. Access gives me 65K row limitation error, though I thought that was no longer an issue in Access/Excel 2007. Any hope?

Long story:

I have several databases with 400+ queries that I export into a folder as Excel files (with VBA). I then have some Excel macros that run through all the exported files and format them into pivots, delete the source data, etc. Till recently I exported everything into Excel 2003. Approximately 6 months into the fiscal year I have to limit the number of months of data that's exported due to the 65k row limitation that Excel 2003 had.

This year, since we now have Excel 2007, I thought I would update the code to export into Excel 2007 and thought the problem with the row limitation would be gone. I updated the code to export the query into Excel 2007, but it still gives me an error that I am copying more records that can be copied, etc.

Here's my code to export. If I let it run past the 65K error it exports exactly 65536 records, though into a new Excel *.xlsx file.


Expand|Select|Wrap|Line Numbers
  1.  Function Revenue_Export()
  2.  
  3. 'South Region
  4. DoCmd.OutputTo acOutputQuery, "All", acFormatXLSX, "C:\All Revenue.xlsx", False, ""
  5.  
  6. Revenue_Export_Exit:
  7.     Exit Function
  8.  
  9. End Function
Please help....

Thank you!

Lena
Apr 28 '10 #1
1 5804
Got it working!
Maybe it'll helpo somebody else:

Expand|Select|Wrap|Line Numbers
  1. Function Macro1()
  2. On Error GoTo Macro1_Err
  3.  
  4.     DoCmd.TransferSpreadsheet acExport, 10, "All", "C:\All Revenue.xlsx", True, ""
  5.  
  6.  
  7. Macro1_Exit:
  8.     Exit Function
  9.  
  10. Macro1_Err:
  11.     MsgBox Error$
  12.     Resume Macro1_Exit
  13.  
  14. End Function 
Apr 28 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: jsudo | last post by:
I have a Access database with a large amount of records (close to 500,000) that I would like to export to Excel. I found out that Excel has the capability of of about 65,000 rows so I know I...
4
by: D | last post by:
I've created a report with many subreports of aggregate data. I want my client to be able to export this data to Excel to make her charts, etc. Only one problem: one of the fields is a "SchoolYear"...
2
by: Kenneth | last post by:
How do I remove the limitation in Access that deny me from exporting 24000 rows and 17 columns (in a query) into Excel? Kenneth
1
by: Suffrinmick | last post by:
Hello Everyone I've built a database using Access 2000 which includes a query which is built using a form containing filters. No problem. When I export the results of the query to excel, (File >...
21
by: bobh | last post by:
Hi All, In Access97 I have a table that's greater than 65k records and I'm looking for a VBA way to export the records to Excel. Anyone have vba code to export from access to excel and have the...
2
by: =?Utf-8?B?UHJpeWE=?= | last post by:
Hi, I'm faced with a classic problem of how to update a large number of records from a web page. I;m trying to build an interface that will display recordset in the order of 3000 rows and allow...
3
by: mnjkahn via AccessMonster.com | last post by:
I'm running Access 2003, modifying a query that has over 45 fields. When I right click on the field name in Query Design View, and then click Build, Access crashes before the Build window...
4
by: myemail.an | last post by:
Hi all, I use Access 2007 and have the following problems: when exporting banal select queries (either to Excel or to a csv file) I find that exporting often doesn't work and creates a file with...
4
by: b4iquit | last post by:
Hi, I need to rack and stack some data using a pivottable. I'd like to do it in excel. I have the query in Access 2007 finished but it is 800,000+ records. How can I get it to Excel 2007....it...
4
by: dizzydangler | last post by:
Hi all, I am a new Access user and just starting to get my head around some of the basic concepts, so please take it easy on me :) My company has been managing client records on excel, and I’m in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.