Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Access Table from VB

Status
Not open for further replies.

kbWilliamson

Programmer
Feb 28, 2002
18
US
Any of you learned folk know of a way to cause Access to export a table (or query) to an Excel worksheet via a DAO or ADO command?
 
First make a reference to the Microsoft Access Object Library then do something like this.

Dim AccessObject As Access.Application
Set AccessObject = New Access.Application
AccessObject.OpenCurrentDatabase ACCESSFILENAME
AccessObject.DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "tblName", App.Path & "\Test.xls"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top