Access 2000 questions...

Associate
Joined
27 Jan 2005
Posts
1,374
Location
S. Yorks
Simple Access questions, I hope...

I have numerous comma seperated data files, the names of which are all in the following format ???1 to ???10 and then ???a to ???z I am looking to do a loop that will automaticly import these files into an access database. The numeric ending files are simple to do, however, how do I get the files ending in a character imported? Can it all be done with a single loop?

Second thing the files, although they are text files, don't have a file extension will this have any efffect on how to import the files?

Third thing the files all have header details, stating where they came from, then a blank line, then the field details and then another blank line is there a way to edit the files before importing to delete this header info?

Can the above be done with Access, I seem to rememeber Access 2 and 95 not having the facility to skip lines at the start of text files, or do I need to look at using something else???

regards,

Matt
 
DT,

Thanks for reply...

Just been having a think, as the files are text files is it possible to open the text file read the length of the first line/record, the header details will be short in length, if the length is above a certain size write that out to a seperate text file?

example file with line numbers:

1 Header1,,
2 Header2, bumpf1, bumpf2
3 Header3, bumpf1, bumpf2
4 more bumpf
5
6
7
8 Blank line
9 Field1, Field2, to Field 50
10 blank line
11 data1, data2, to data 50
12 data1, data2, to data 50
13 data1, data2, to data 50
...
8000 data1, data2, to data 50
8001 eof

output file with lines

1 Field1, Field2, to Field 50
2 data1, data2, to data 50
3 data1, data2, to data 50
4 data1, data2, to data 50
...
7992 data1, data2, to data 50
7993 eof

Can this be done with Access or should it be written with VB??

If I have a go at writing a small VB app, that formats the files and renames them this could then be called from the Access database.

regards,

Matt
 
Back
Top Bottom