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!

How to export a table in access to excel via command button 2

Status
Not open for further replies.

docmeizie

Programmer
Aug 5, 2003
326
US
How would you go about sending a table from Access to excel via a button on a form? I know it can be done but the process eludes me as of now. Any help would be greatly appreciated.

If I take a peek in your Windows, to fix a problem, does that make me a "Peeping Tom"? Hmmmmmmmmmmv [pc1][shocked]
 
You would use the 'TransferSpreadsheet' function behind your form's command button. Access 'Help' files detail how this is used. I've used it myself many times and it does work very well. Only problem is that this function does not allow exporting a table into an existing spreadsheet - you must always provide your new file name and path. It will overwrite an existing one, however, if that's any consolation.

If you must get data from Access into Excel and it must be into an existing spreadsheet, you can use the Get External Data wizard in Excel. That works great too, once you get the hang of it.

Hope this helps. Good luck.
 
see output method

DoCmd.OutputTo objecttype[, objectname][, outputformat][, outputfile][, autostart][, templatefile]

DoCmd.OutputTo acOutputTable, "Employees", acFormatXLS, "Employee.xls", True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top