VB Code to transfer report from Access to Excel

  • Follow


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. 
1
Reply RB 3/22/2007 3:27:23 PM

On Mar 22, 11:27 am, "RB" <mcrace...@yahoo.com> wrote:> 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 andtransfer methods available. Two that come to mind are    DoCmd.RunCommand acCmdOutputToExcel    DoCmd.OutputTo acOutputReport, blah, blah
0
Reply storrboy 3/22/2007 3:40:28 PM

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, acFormatXLSThanks again for your help."storrboy" <storrboy@sympatico.ca> wrote in message news:1174578028.682499.7940@p15g2000hsd.googlegroups.com...> On Mar 22, 11:27 am, "RB" <mcrace...@yahoo.com> wrote:>> 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> 
1
Reply RB 3/22/2007 4:27:50 PM

2 Replies
1003 Views

(page loaded in 0.056 seconds)


Reply: