Extract specific data fields from a text file and link them to ms access table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chintu4love
    New Member
    • Oct 2014
    • 3

    Extract specific data fields from a text file and link them to ms access table

    Hi All,
    I happened to run a report from a mainframe and I get the report in a form of text file everyday. I need only specific data from the whole report and the text file is not delimited or in any structured format. How to extract specific data from a text file and import it on to ms access table. And also if I place the same file in a folder and run on daily basis to import the same data fields then please guide me how to achieve it ...thanks in advance..
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1293

    #2
    There must be some keywords or some patterns within the text file or you have a very manual process on your hands. It is possible to read text files with Access, line by line or character by character if you choose. All that is lacking is some rules to guide the parsing process.

    Study several files. What are you trying to pull out? How is it identified in the text? That is, how do you know which pieces of data you want? Talk it out with someone. How would you do it in a completely manual way? Then come back here and describe your project again.

    There are numerous threads about this sort of problem here at Bytes.com. Take a look at http://bytes.com/topic/access/answer...file-byte-byte or do a web search like this: vba access read text files site:bytes.com

    Also, look at DoCmd.TransferT ext.

    Jim

    Comment

    Working...