Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    Location
    Maryland
    Posts
    11

    Unanswered: I am Clue Free - Ripping text files.

    I was wondering if any members know where I can find a good tutorial on extracting info from text files.

    Without going into too much detail My company publishes telecommunications work orders in the form of a text file that has a rather specific format which would seem pretty ideal for ripping, if I only had a clue.

    Your help would be appreciated.

    BB.
    K did you Flashy thing me, K??

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    How code capable are you?

    Conside using the "Open strFile As #1" statement to open the file and then loop through the file line by line with the Read statement and find key words in the each line using the InStr function.

    You may have some luck looking into Schema files. If you are able to setup a Schema file that works with the text file, you can link directly to the text file from Access and avoid code all-together.

    Good luck

  3. #3
    Join Date
    Nov 2003
    Posts
    1,487
    Hmmm...Well:


    Code:
    Dim FFile As Integer
    Dim Strg As String
    Dim OnLine As Long
    Dim SrchString As String
     
    FFile = FreeFile
    OnLine = 0
    SrchString = "This Is What I'm Looking For"
     
    Open "myTextFilePathAndFileName" For Input As #FFile
    Do Until EOF(FFile)
    	 Line Input #FFile, Strg
    	 OnLine = OnLine + 1
    	 If Instr(Strg,SrchString) > 0 Then
    		 If MsgBox("Search String Was Found On Line " & OnLine & _
    			 vbNewLine & vbNewLine & "Do You Want To Continue?", _
    			 vbQuestion + vbYesNo,"String Found...") = vbNo Then
    			 Exit Do 
    		 End If
    	 End If
    Loop
    Close #FFile


  4. #4
    Join Date
    May 2003
    Location
    Maryland
    Posts
    11

    A very real, if late Thankyou.

    I'm sorry it tooks so long to get back to you.
    Work trumps life once again.

    but thanks much for the reply, I very much look forward
    to seeing if I can make this work.

    Thanks again, BB.
    K did you Flashy thing me, K??

Posting Permissions

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