Results 1 to 4 of 4
  1. #1
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    862

    Runtime 2302 error

    I tried exporting a query into excel



    DoCmd.OutputTo 1, "Final Sponsor", acFormatXLS, "C:\Temp\Sponsor - " & Format(Date, "dd mmm yyyy") & ".xls", , 0

    I get "Microsoft Access can't save the output data to the file you've selected."1 should equal a query.

    The command works for acReports (3) AcformatXLS works for reports output to xls.

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    What is the 0 at the end? It appears to be in the template argument, which would be a path.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    862
    That worked, Thanks PBaldy

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    No problemo!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 08-22-2015, 11:26 AM
  2. Runtime 438 error
    By Thompyt in forum Programming
    Replies: 2
    Last Post: 06-04-2015, 10:35 AM
  3. Replies: 2
    Last Post: 10-15-2014, 04:23 AM
  4. Replies: 13
    Last Post: 06-12-2012, 09:52 PM
  5. Error in Runtime Only
    By drunkinmunki in forum Programming
    Replies: 7
    Last Post: 12-16-2010, 03:43 PM

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