views:

121

answers:

2

I have a Table in Access 2007 with 11,000 rows and about 20 columns. I want to create a form button that export the table to a Excel sheet. Code need to be VBA

Any Ideas??

+2  A: 

From access you can also use the TransferSpreadsheet method.

AlexCuse
A: 

Here's an example.

    DoCmd.TransferSpreadsheet acExport, _
                                acSpreadsheetTypeExcel8, _
                                "myQuery", _
                                "C:\myDir\myFile.xls", _
                                True

You probably need to make sure that your destination is clear of the output filer (myFile.xls).

CodeSlave