Results 1 to 4 of 4
  1. #1
    need_help12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    58

    Exporting Report to Excel via Command Button

    Good morning. Relatively new to Access, would appreciate any advice.



    I have several reports that I'm able to generate within my database, but as I run these report I need to be able to export the results of the reports to Excel so I can in turn provide these reports to my internal business customers.

    What's the easiest way to accomplish this? Is it possible to put a command button on the Report itself that, when generated, allows me to export the results to Excel?

    Greatly appreciate any help. Thanks!

  2. #2
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    There is a visual basic command available, try taking a look at:
    http://msdn.microsoft.com/en-us/library/ff192065.aspx

  3. #3
    need_help12 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2012
    Posts
    58
    Would the VBA example in this link you sent pull the data AFTER the report was run? I'm not well versed in code, so I want to double check.

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    One method I use extensively in my Access Database applications is to create a macro that uses the ExportWithFormatting macro 'Action'.
    You can set this action up in your Macro so that it exports your report to Excel.
    What I do once I'm satisfied that my report is producing the correct data, is to create a Macro called 'AutoExec' and either put thisaction in there - or call the Macro that has the actino from inside the AutoExec macro.
    Finally, I add a scheduled task in the Windows Task Scheduler to open the database at a set time.
    When the scheduler opens the database, the AutoExec macro runs, executes all the actions in there - including the 'QuitAccess' action that closes the database.
    I hope this helps!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. command button to export to excel
    By jains in forum Forms
    Replies: 5
    Last Post: 06-30-2015, 06:27 PM
  2. Exporting a Access Report to an Excel File
    By Coffee in forum Import/Export Data
    Replies: 2
    Last Post: 07-28-2014, 11:32 AM
  3. Exporting report selected from a listbox to excel
    By GARCHDEA in forum Import/Export Data
    Replies: 1
    Last Post: 08-10-2010, 07:45 AM
  4. Replies: 1
    Last Post: 07-27-2010, 02:27 PM
  5. Exporting a Report to Excel
    By bullwinkle55423 in forum Reports
    Replies: 0
    Last Post: 12-11-2007, 10:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums