SEnding report to excel

Toeying

Registered User.
Local time
Today, 06:39
Joined
Jul 30, 2010
Messages
79
Hello all I have a report with a subreport which I want to export to excel. problrm is, it is exporting just one line of the data. When I preview the report, it contains all the information I need but in the excel sheet, it contains just the first line of the firstpage of the excel sheet. Is this happening because the page with is more than the screen?
please help?

Thanks
Ty
 
How are you exporting into Excel, is it just the main report name or are you exporting both report names?

Are you using the source ie a query or queries or tables?

Is this being done via a macro?

What version of Access are you using.
 
Hi Trevor,
I am exporting just the main report name.
am using a query to feed the report
am not using a macro. the code is just behind a command button
and my version is 2003

thanks
 
Behind your command button you will also have to add the subreport name otherwise it will only be the main report.

Have you used the wizard to create the button and used the Report operations and Send Report to File, if so you have an issue.

What are you aiming for, the sub report to be on the worksheet as the main report?
 
yes i have used the wizard.
and what i want to do is to send the subreport to the worksheet. the main report just houses the sub report
thanks
 
Then you need to adjust the name in the code behind the button.

Open your form which has the button on it, then go into Design view, then select the button and open the properties, then look at the Event Tab and click in the On Click Event, then use the elipses button on the right and this will show you the code screen, in there you will see your main report name, change it to the sub report and hopefully it should give you a result.
 
Hi Trevor,
I have tried what you suggested but I just got an error message saying "Microsoft access can't find the field "|" referred to in your repression". Where do u think this is coming from? thanks. I've checked everywhere but cant figure it out. thanks
 
Hello, I think I am sorted for now. I used DoCmd.TransferSpreadsheet instead. I will look into using OUTPutTo some other time. Thanks a lot.
TY
 
Pleased to read you have it working.
 

Users who are viewing this thread

Back
Top Bottom