Results 1 to 2 of 2
  1. #1
    rossib is offline Novice
    Windows XP Access 2003
    Join Date
    Dec 2009
    Location
    Australia
    Posts
    1

    TransferText problem

    I would be grateful for some help.



    I have a csv file (C:\cc.csv) as follows:

    PurchaseOrderNumber,DocumentDate
    6310S02621733,12/12/2009
    6310S02621734,12/12/2009

    I have created a table in Access2003 with the correct field names. The data type for both fields is "Text". (DocumentDate is text format as I need to manipulate it after import) I am trying to use VB code to import the data from the csv file to the table using code:

    DoCmd.TransferText acImportDelim, , "ORDERS", "C:\cc.csv", True

    It reads the data in but omits the letter "S" (fifth character in first field)

    If the "S" is relaced with a "V" or "X" and I run the code, the "V" or "X" are imported correctly.

    This must be caused by something incredibly simple, but unfortunately I cannot find it!!

    Thanks in anticipation.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    To be honest, that does not look like a properly prepaired .csv file. The first field is obviously a string (text) field and yet not surrounded with double quotes.

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

Similar Threads

  1. Replies: 1
    Last Post: 11-10-2009, 03:03 PM
  2. DoCmd.TransferText only if file is new
    By Coolpapabell in forum Programming
    Replies: 1
    Last Post: 10-14-2009, 01:57 AM
  3. query problem i have a problem wi
    By maxx3 in forum Queries
    Replies: 0
    Last Post: 06-29-2009, 02:29 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