VB Code to transfer report from Access to Excel

R

RB

I have a report that I want to transfer to an excel spreadsheet from Access.
I need to make this a macro or vb code on a button on a form, but cant seem
to find a way to do it. I'd like to use the "Analyize with Excel" button,
but cant see how to use it. Thanks in advance for your help.
 
S

storrboy

I have a report that I want to transfer to an excel spreadsheet from Access.
I need to make this a macro or vb code on a button on a form, but cant seem
to find a way to do it. I'd like to use the "Analyize with Excel" button,
but cant see how to use it. Thanks in advance for your help.


Take a look at the DoCmd object there are a number of output and
transfer methods available. Two that come to mind are

DoCmd.RunCommand acCmdOutputToExcel
DoCmd.OutputTo acOutputReport, blah, blah
 
R

RB

I think i sent this reply directly.. sorry for the inconvenence.

That helped me get there. Here is what I used:

DoCmd.OutputTo acReport, stDocName, acFormatXLS

Thanks again for your help.
 

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