Problem in exporting the access 2007 report to excel

  • Thread starter Thread starter Deepti Jain
  • Start date Start date
D

Deepti Jain

Hi,

I have migrated the database from Access 2003 to Access 2007.
I am exporting the data from Access Report to the Excel 2007.I am getting the error "Error 3270 Reserved Error" while using the command which is mentioned below:-

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, QueryName, ReportFileName, True

It is prompting a widow while exporting the data and asking about the parameters for the report which is not having the records.If the record is there in the report the report is exporting successfully to the excel.
Please advice.

Thanks & Regards,
Deepti Jain
 
There is no way in Access 2007 to do that.

Yes, I know we could in 2003, but Microsoft removed this capability,
apparently related to a legal action.

Because I have users of one of the systems I created and support who MUST be
able to export-to-Excel, I've come up with a work-around. It may or may not
be applicable in your situation...

I base my reports on queries (a good practice anyway).

The queries, unlike the reports, CAN be exported to Excel.

When my users need to "export-to-Excel", I've provided a command button that
"looks up" the query that is used for a selected report (I provide a
combobox with a list of available reports) and exports that query instead of
opening the report (that's a different command button). An alternate
approach would be to use an option group to select "Export" or "Preview",
then use a single command button.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Hi Jeff,
Thanks for your reply.
I am exporting the query directly into the Excel without opening the report and using the below command

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, QueryName, ReportFileName, True

It is prompting the error "Reserved Error" if i click on the "ok" button of the parameter popup window,if i click on "cancel" button giving error "Runtime Error 3125".
Please help me to solve this problem.
Thanks & Regards,
Deepti Jain
 
A parameter popup implies a parameterized query. Does your query include
parameter(s)?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top