mark909 said:
Thanks but the report contains subreports
What I specifically want is to transfer information from individual cells in
a report to individual cells in excel.
I cant export the whole report because the different subreports are composed
of different criteria from multiple tables
From what little I've seen anything beyond a simple report doesn't
export well to Excel. And if it does it's ugly beyond belief.
If you want to spend lots of time in VBA code I'd suggest doing the
copyrecordset thing.
Modules: Sample Excel Automation
http://www.mvps.org/access/modules/mdl0006.htm
Modules: Transferring Records to Excel with Automation
http://www.mvps.org/access/modules/mdl0035.htm
Now you'd almost certainly want to have loops for the outmost set of
records, copy those values one record at a time into the current Excel
row, Then shift to the right some inside Excel and use the
copyrecordset to dump the first subreport into the spreadsheet. Then,
by keeping track of the number of records in the first recordset you'd
move down that many cells and dump in the next sub report. And so
forth.
So it would look something like
abc | 123 | 455
def | 23423 | 2343
hig | 23423 | 2343
asdflj | 234443 | 34234 | 234234
def | 323 | 234
dsdf | 23423 | 2343
sxe | 23423 | 2343
ljiuer| 234443 | 34234 | 234234
and so forth.
Tony