• Using variable in transfer command (2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Using variable in transfer command (2003)

    • This topic has 1 reply, 1 voice, and was last updated 18 years ago.
    Author
    Topic
    #442926

    I have a form that I use to enter date criteria for transferring data to Excel.
    I can hard code the file name in Excel but would prefer to use a variable. The variable depends on the month of year and shows correctly on the form. However, when I run the transfer command below:

    DoCmd.TransferSpreadsheet acExport, 8, txtPath, True, “”

    I get an error telling me that I have the wrong data type for one of the arguments.
    I declared the variable as a variant.

    Help! Please!

    Thanks,

    itconc

    Viewing 0 reply threads
    Author
    Replies
    • #1067347

      Sorry, but I think I forgot the part of the query I want to transfer.
      It should read:
      DoCmd.TransferSpreadsheet acExport, 8, “Monthly Report-Claims Detail”, txtPath, True, “”
      Amazingly – it works!
      Sorry to bother you all!
      itconc

    Viewing 0 reply threads
    Reply To: Reply #1067347 in Using variable in transfer command (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel