Hi Steve,
Yup, DB with different tables would be fine. Please find the attached sample database for ur reference.
Thanks
rk
OK, this is where the code is at now
And now...
ParsingExample.zip
Here's an example, put both files in the same directory then run the module Mod_ImportData
Hi, Thanks for the code. It works pretty good. My question is how we can update the code if we have multiple text files which need to be imported to the tables and also for section 3 there are occasions when some of the records in column 2 might have multiple rows. In this case I would like to have the data in the same record even though it spans multiple lines. Please see the attached file for sample database and text files. Also I think you used tab delimited to split the data but the problem is the files are not always tab delimited. The way i would like to have is the columns will have fixed length and I would like to split based upon the length.
Thanks
rk
ParsingExample.zip
Here's an example, put both files in the same directory then run the module Mod_ImportData
I can't read access 2007 files most of the time but I can answer your questions.
I used a tab delimiter because the file you originally posted was tab delimited, if you want to use a mid() function to peel out your data that's up to you.
If you are processing multiple files just use the filesystemobject commands to cycle through files in a directory, here's a link to show you how:
http://www.4guysfromrolla.com/webtec...ect/faq5.shtml
As far as parsing (I assume you're talking about section 3 of the report) multiple lines into a single record, much like I'm testing for the "SECTION" string you can test for the "TEST" string within the loop mechanism of the section 3 case statement, in essence a select case within a select case.