Export to Excel Button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to create a button the when clicked it will export the current table
to an Excel spreadsheet. I know how to creat buttons and all, but what is the
code that will do this?
 
Put the Docmd.OutputTo function in the On_Click button Event.

Exemple : DoCmd.OutputTo (acOutputTable, "YOURTABLENAME", acFormatXLS)
 
dear larry g .
the code docmd.outputto method do fine in xporting the qyery / table. to
say to an XLS file but sir i would like to know how to retain the format of
the xls file which will get changed on every event occurs please advise .
 

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

Back
Top