Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    TransferDatabase (2000)

    Ok guys....what's wrong with this code? Works fine in 97 but not in 2000:

    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "tblMthExport", "c:My DocumentsExcel" & Me!txtExportDate.Value & ".xls", False, 0


    It takes the "value" in a text box and assigns it the name of the "new spreadsheet".....used this code for years in 97..tried to apply it to a db in 2000 and I get this error msg:

    c:My DocumentsExcel04303.xls is not a valid path

    Does anyone have any suggestions as to what the problem may be?

    Thanks
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

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

    Re: TransferDatabase (2000)

    When I copied your instruction into Access 2002 and only modified it to use a table in my database, and a valid path on my PC, I got the same error message. Then I deleted the instruction, typed it anew from scratch and it worked without a hitch... <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

    What happens if you do the same?

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TransferDatabase (2000)

    Hans,

    Guess it goes to prove...try the simple things first...I retyped it too and it worked fine.

    I wonder why that is?

    Thanks for your help.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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