none
Can I save an Access 2013 Report as a file in the “.txt” format? In a default location? Or a location I pick? RRS feed

  • Question

  • Can I save an Access 2013 Report as a file in the “.txt” format? In a default location? Or a location I pick?

    If I can depend on the “Report.TXT” always saved in same spot Like   “C:\MyDocs\Report.txt”

    Then all the hard parts are solved. Just have to watch out for typos in the rest of my code.

    Mark J


    Mark J

    Saturday, November 26, 2016 5:58 AM

Answers

  • If you want to export a specific report, use code like

    DoCmd.OutputTo acOutputReport, "rptMyReport", acFormatTxt, "C:\MyDocs\Report.txt"

    where rptMyReport is the name of the report.

    If you want to export the currently opened report, irrespective of its name, use

    DoCmd.OutputTo acOutputReport, , acFormatTxt, "C:\MyDocs\Report.txt"


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by PuzzledByWord Sunday, November 27, 2016 5:50 AM
    Saturday, November 26, 2016 10:40 AM

All replies

  • If you want to export a specific report, use code like

    DoCmd.OutputTo acOutputReport, "rptMyReport", acFormatTxt, "C:\MyDocs\Report.txt"

    where rptMyReport is the name of the report.

    If you want to export the currently opened report, irrespective of its name, use

    DoCmd.OutputTo acOutputReport, , acFormatTxt, "C:\MyDocs\Report.txt"


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by PuzzledByWord Sunday, November 27, 2016 5:50 AM
    Saturday, November 26, 2016 10:40 AM
  • Hans Vogelaar,

    Thanks, very much.

    I was hoping there was a something like this.

    Mark J 


    Mark J

    Sunday, November 27, 2016 5:50 AM