none
DoCmd.RunSavedImportExport giving error 31602 RRS feed

  • Question

  • Hi

    I made and saved an Importspecification that worked fine.

    Now when I try to run it by code I get error 31602

    code is like this:

    DoCmd.RunSavedImportExport ("NYTTDLPUNDERLAG Importspecifikation")

    I check the spelling and its right.

    I run the spec manually again and it works


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00

    Wednesday, October 28, 2015 9:54 AM

Answers

  • Stupid me.

    There are Import Specs and Import Specs

    The one I designed has to be started by code:

    Dim strFolder1 As String

    strFolder1 = [Forms]![Alla Val]![EgenPathAnnat]

    DoCmd.TransferText acImportDelim, "NYTTDLPUNDERLAG Importspecifikation", "NYTTDLPUNDERLAG", strFolder1 & "NYTTDLPUNDERLAG" & ".txt", False


    Best // Peter Forss Stockholm and Sigtuna GMT +1.00


    Wednesday, October 28, 2015 1:45 PM