Results 1 to 3 of 3

Thread: Populating textboxes from a .txt file

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    Question

    I'm looking for the simplist and most efficent way to populate data into textboxes (about 40 of'em) from .txt files. The data is comma delimited and also uses carriage returns (vbcrlf). I was placing my data into an array and using "Open" and "Input" to read the file, but now I found out that I can't have trailing comma's. This messes up the entire order of my array and now places data in the wrong textboxes. Does anyone have any suggestions how I can get around this. I was thinking maybe using the "Instr" or "Split" function. Any suggstions or code examples will be appreciated...

    thanks

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    You could use the Data Control and set the Connect property to Text; and the DatabaseName to the location of your Text File.

    Just add an additional line to the beginning of the Text file to be used as the Field names, then you can manipulate the file like a database table.

  3. #3

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    Unhappy

    Arron that sounds like a great idea...the problem (always a problem!!!) is the user will be able to make their own files and then repopulate with any of the files they create or have been created...I'm not working with one file but, multiple files, so my data will always be changing...

    thanks though...

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