Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem in exporting the access 2007 report to excel

3 views
Skip to first unread message

deeptijain

unread,
Oct 1, 2008, 8:39:47 AM10/1/08
to
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

Jeff Boyce

unread,
Oct 1, 2008, 6:47:52 PM10/1/08
to
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


<Deepti Jain> wrote in message news:200810183947...@gmail.com...

deeptijain

unread,
Oct 6, 2008, 2:07:16 AM10/6/08
to
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.

Jeff Boyce

unread,
Oct 6, 2008, 11:00:26 AM10/6/08
to
A parameter popup implies a parameterized query. Does your query include
parameter(s)?

Regards

Jeff Boyce
Microsoft Office/Access MVP

<Deepti Jain> wrote in message news:20081062716d...@gmail.com...

0 new messages