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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export recordset - create new tab on break

Status
Not open for further replies.

kq

Programmer
Aug 15, 2001
39
0
0
US
I have an Access recordset that contains data (too many rows for Excel to handle in one month). I'd like to export the data and create a new tab for each month.

Any way to do this on the fly? (Programatically speaking, that is).

Thanks!

Example

tab 1
2004-01 blah blah blah
2004-01 blah blah blah

tab 2
2004-02 blah blah blah

 
Hi kq,

do you use the Transferworksheet method to export to excel?
If you do, then exporting to a same file many tables or queries or what ever, each export creates a different tab inside that excel file. The problem is, how many months do you have to export? Maybe you should create a parameter query for export and feed it with all the months and years reported back from another query.
So, I suggest create a recordset to retrieve months and years. Loop till .EOF and for each record export the parameter query (fed by the recordset) to the same excel file.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top