+ Reply to Thread
Results 1 to 2 of 2

access 2010 export report to excel vba

  1. #1
    Registered User
    Join Date
    11-19-2012
    Location
    Clearwater, Florida
    MS-Off Ver
    2010
    Posts
    2

    access 2010 export report to excel vba

    In order to achieve running totals, I have developed a report which nicely displays the data that I am after. I can manually open the report and go through the steps to export the report data to Excel. I can then link to Excel, create a query, and use that for a form or further reporting. Although I can successfully do these steps manually, I need a button/macro or vba commands to do this for users when in a deployed database. Any help is appreciated.

  2. #2
    Registered User
    Join Date
    11-19-2012
    Location
    Clearwater, Florida
    MS-Off Ver
    2010
    Posts
    2

    Re: access 2010 export report to excel vba

    Tried a little harder and found the following to work.

    Private Sub cmdRptLabels_Click()
    DoCmd.OutputTo acOutputReport, "ReportName", acFormatXLS, "Drive:\Path\FileName.xls", 0
    'Keep Excel file closed = 0; to open Excel file automatically = -1

    MsgBox "Data has been generated for the labels. Your label report will now open.", vbOKOnly, "Make Labels"
    DoCmd.OpenReport "NewReportName_UsingExcelData", acViewPreview, , , acWindowNormal

    End Sub

    Posting for benefit of others. Thank you for anyone responding.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1