Exporting to Excel

S

Sue R

I need to export an Access 2007 report to Excel 2007. I need to be able to
programmically enter text headings into specific cells on the worksheet also.
Help!
The transfer spreadsheet seems to only use queries or tables. Is there a way
to do this?
 
O

OssieMac

Hi Sue,

Your quote:" The transfer spreadsheet seems to only use queries or tables".

Make a backup of your project before doing the following.

Basically reports use the same tables or queries. However, if the report
query is embedded in the report as the Record Source then you can open the
Record source query builder and while it is open if you click on save then
the query can be saved as a Query and the saved Query then becomes the Record
source for the report. You can then use that same query to export to Excel.

Lookup CreatObject in the Access VBA editor for how to open Excel and if you
can program in Excel then you should not have too much trouble making changes
with Excel VBA.

To create Excel VBA code from Access, while in the Access VBA editor you
need to
Select Tools -> References and then scroll down until you find Microsoft
Excel nn.0 Object Library and check the box. (Ensure you check the box; don't
just select the line). (nn is the version of Excel. eg. 10.0 = xl2002, 11.0 =
xl2003 12.0 = xl2007)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top