Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Location
    Cinci, OH
    Posts
    49

    Unanswered: importing questions

    Hey all,

    Here is my question:
    How would I import File.txt into a table in a fixed format but using a button on a form? Is is possible? I can do it manually of course but I want to dumb it down for the user. Any ideas would be great.

    Thanks.
    Richard.

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    In code, I would open the file, start a loop for each line and use several mid statements to add a record to a recordset. I like this method since I can verify the data as I bring it in.

    Another option is to link to the file, and run a query to append the data to a table. If you use this, then you have to figure out what to do if/when there are errors.

    You could also try the TransferText command. I use this when I know the data is reliable like from my bank.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Quote Originally Posted by jmrSudbury
    In code, I would open the file, start a loop for each line and use several mid statements to add a record to a recordset. I like this method since I can verify the data as I bring it in.

    Another option is to link to the file, and run a query to append the data to a table. If you use this, then you have to figure out what to do if/when there are errors.

    You could also try the TransferText command. I use this when I know the data is reliable like from my bank.
    If that's your preferred method, you should really consider using arrays and the split function.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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