By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,587 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,587 IT Pros & Developers. It's quick & easy.

Reading structured text files

P: n/a
Does anyone know of an article that deals with the subject of reading a
structured text file using VBA code in Access?

Thanks,
Wes
Oct 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"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

Oct 25 '06 #2

P: n/a
Thanks for the info.
I think that will get me there.
Wes

"Larry Linson" <bo*****@localhost.notwrote in message
news:57P%g.7980$LA.6111@trnddc06...
"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

Oct 26 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.