Results 1 to 8 of 8
  1. #1
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185

    DoCmd.TransferText Function issue

    unction SalesOrderDetail()


    'On Error GoTo ASN_Error
    '*** IMPORT FUNCTION - START ***
    Dim DDate, strfile As String
    Dim LMsg As String
    Dim DDDate As Date
    DoCmd.SetWarnings False
    '** Step 1 -- Define where and what naming sequence the files are.
    ChDir ("K:\Teams and Projects\Operations-Common\SpeedDB")
    strfile = Dir("K:\Teams and Projects\Operations-Common\SpeedDB\Sales Order Detail.CSV")
    Do While Len(strfile) > 0
    DoCmd.SetWarnings False
    DoCmd.TransferText acImportDelim, "SalesOrders Import Specification", "SalesOrders", "K:\Teams and Projects\Operations-Common\SpeedDB" & strfile, True
    'Kill "K:\Teams and Projects\Operations-COmmon\SpeedDB" & strfile
    FileCopy "K:\Teams and Projects\Operations-Common\SpeedDB" & strfile, "K:\Teams and Projects\Operations-Common\592 History" & strfile
    DoCmd.SetWarnings True
    '** Step 7 -- Reset the "strfile", which looks for any other files to import, and restart loop.
    strfile = Dir
    Loop

    Call VerifyImportErrorTables
    DoCmd.SetWarnings True
    End Function

    I have Highlighted in red where my issue is. I am having trouble finding the Specification Name "SalesOrders Import Specifications" . I am not sure where to look for this. I went to this link earlier and have not had any luck. https://msdn.microsoft.com/en-us/lib.../ff835958.aspx

    Any help would be appreciated.

    Thanks,
    Nick

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    not sure where you will find it in 2002 - in 2007 and later there is a 'saved imports' option.

    However you should be able to find it if you start an import of the file from the commandbar. As you go through the import steps you will see an advanced button. Click on this and a new form will open up. On this form is a Specs button. Click on this and you will see the saved specs. If there isn't any, complete the form for each column, file format etc and save. You can then use whatever you saved it as.

  3. #3
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185
    Ok, I will give it a try, thank you. It is an excel file 2010 version.

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    excel is different - unless saved as a .csv file.

    if a 'real' excel file (i.e. .xlsx) then a) you need to use transferspreadsheet and b) I don't think 2002 will read a .xlsx so you would need to go into the excel file and save as a .xls or .csv

  5. #5
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185
    It is a .csv file.

  6. #6
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185
    The system import seems to be working but all of sudden one day last week when we downloaded the new file and tried to import it. Not all the information was being imported into our report. It is an order report where it sorts orders placed as late or on time depending on when they shipped.

  7. #7
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185
    We have a backup file that works. I'm just trying to figure out why it is not transferring over correctly.

  8. #8
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185
    I just want to see where these specifications are normally saved? The help page said that it possibly could be saved with the .csv file itself but it doesn't seem to be there.

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

Similar Threads

  1. Absolutely Stumped on a DoCmd.RunSQL issue
    By Nuke1096 in forum Access
    Replies: 13
    Last Post: 01-17-2014, 04:03 PM
  2. Docmd.TransferText Spec File Not Found
    By Patrick.Grant01 in forum Programming
    Replies: 7
    Last Post: 05-22-2012, 09:32 AM
  3. DoCmd.TransferText acExportDelim Troubles
    By svcghost in forum Import/Export Data
    Replies: 1
    Last Post: 12-14-2010, 02:35 PM
  4. DoCmd.TransferDatabase acImport Issue
    By remingtont in forum Programming
    Replies: 0
    Last Post: 11-12-2010, 03:59 PM
  5. DoCmd.TransferText only if file is new
    By Coolpapabell in forum Programming
    Replies: 1
    Last Post: 10-14-2009, 01:57 AM

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