Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    excel spread sheet instead of report (access2000)

    I have a query that I want to export as an excel spread sheet. I know how to do this manually but is the a process that would automate this. Thanks..

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: excel spread sheet instead of report (access2000)

    You can create a macro or VBA code to export a query or other database object to Excel. The VBA method is DoCmd.TransferSpreadsheet. The syntax for exporting is

    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "QueryName", "C:ExcelExport.xls", True

    The last argument specifies whether you want to export the field names together with the data. You can call the macro or VBA code (for example) from a command button on a form, or from a custom toolbar button.

Posting Permissions

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