Importing delimited text

G

GPO

Access 2000 SP 3

Howdy all. I'm importing tab delimited text using:

DoCmd.TransferText acImportDelim, "MySpec", "tblMyTable", FileToLoad, False

Two related questions.
1) I want to check the delimiting before I start. How can I look into the
text file and see that there are x number of tabs in each row? If there
aren't the desired number, I don't want to import it.
2) Is there a way to run through the text file and look for characters not
in ASCII Character Set (0 - 127)?

Regards

GPO
 
G

GPO

Thanks for this. It's no good me using your Perl suggestion though! As good
as it probably is, I don't speak Perl and therefore could not maintain it.
Your solution VBA might be more clunky, but if it works then that's good
enough for me. Many thanks once again.

GPO
 
J

John Nurick

With maintainability in mind, I suggest you use the FileSystemObject and
TextStream objects to open and scan these files (or else as you
suggested elsewhere import each line into a single memo field). The
TextStream object's methods seem handle Unicode more gracefully than the
old Open, Line Input and so on.


Thanks for this. It's no good me using your Perl suggestion though! As good
as it probably is, I don't speak Perl and therefore could not maintain it.
Your solution VBA might be more clunky, but if it works then that's good
enough for me. Many thanks once again.

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top