Results 1 to 7 of 7

Thread: TransferText?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715

    TransferText?

    I have an csv file which looks like this:

    1,243,243hrzn',03/04/2003'
    2,244,244brst','01/15/2001'
    3,42,42Ortho',03/01/2003'
    4,70,70slvy','01/15/2001'
    and I want to put those into a table (tblTempMasterDates) usin the TransferText Command. The only problem is that the command is looking for the field F1, F2, F3, and F4.
    Is there any way that I can just put the data into the fields that are already in the DB?

    Code:
    DoCmd.TransferText acImportDelim, "", "tblTempMasterDates", "C:\Progra~1\VIH\return.csv", False

    thanks

    Dimava
    NXSupport - Your one-stop source for computer help

  2. #2
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    In Access yes??

    You create a "specification" by importing a test file first that has the same format. Then you can choose to save the specification.

    In that code there is an option for a specification i think.

    b

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    Thanks for the reply,

    i'm using access 97

    how can I import that test file and save that format as a specification?

    thanks

    Dimava
    NXSupport - Your one-stop source for computer help

  4. #4
    Frenzied Member andreys's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,615
    Insert fields names that you want in first lane of your .csv file:

    Code:
    "ID","FieldName1","FieldName2","myDate"
    1,243,243hrzn',03/04/2003' 
    2,244,244brst','01/15/2001' 
    3,42,42Ortho',03/01/2003' 
    4,70,70slvy','01/15/2001'

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I can't control the contents of the csv file(s)
    NXSupport - Your one-stop source for computer help

  6. #6
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188
    File menu --> Get External Data --> Import --> Choose the .csv file --> Now here's where you click Advnaced in the bottom left corner i think. --> Choose all your options then choose Save AS --> Contiue on until the end.

    You now have a specification saved as whatever you called it. You can now reference it.

    b

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    ok thanks a lot
    NXSupport - Your one-stop source for computer help

Posting Permissions

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



Click Here to Expand Forum to Full Width