"Wes Peters" <wp*****@gwssi.comwrote
Does anyone know of an article that
deals with the subject of reading a
structured text file using VBA code
in Access?
What's your definition of a "structured text file"?
Two common forms of text files are delimited text (each "field" separated by
a delimiter, comma being a common choice, and thus, "Comma Separated
Variables" files with a .CSV extension) and "fixed field" text, where each
variable or field occupies a fixed number of characters. They are special
cases of sequential files.
Pertinent commands/statements are FreeFile, Open, Input, Input #, Line Input
#, Write#, Print #, and Close, all of which you should be able to find in
Help, from a module window... type the term, place the cursor in it, and
press F1.
However, you may be able to accomplish your purpose (which you didn't
explain) in a simpler manner using the TransferText command from VBA, which
you'll find in Help in the same manner.
Knowledge Base article 268848 has a possibly useful example of _writing_ a
sequential file. Using Advanced Search of the Knowledge Base at
http://support.microsoft.com, for Access 2000 with "text file" gives a
number of hits, some of which might be pertinent (looking at the titles,
many will NOT be pertinent to your question). The Access 2000 information
will apply to later versions as well, and most of the File I/O information
will apply to earlier versions, too.
Larry Linson
Microsoft Access MVP