473,511 Members | 15,131 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading structured text files

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
2 3209
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6740
by: Magnus | last post by:
allrite folks, got some questions here... 1) LAY-OUT OF REPORTS How is it possible to fundamentaly change the lay-out/form of a report in access? I dont really know it that "difficult", but...
50
4879
by: Michael Mair | last post by:
Cheerio, I would appreciate opinions on the following: Given the task to read a _complete_ text file into a string: What is the "best" way to do it? Handling the buffer is not the problem...
3
1797
by: HALLES | last post by:
HELLO ! in upper case: i mean to be heard ;o) Compilers are good ! Myself, i used TP6 and TP7 to work on dBASE V files, once ... a long time ago. I was unaware of Internet Usenet world,...
1
2524
by: Jón Sveinsson | last post by:
Hello everyone I have been able to read data from binary files to filestrean, the data in the files are structured, what I'm trying to do is to loop through the binary files and add data to my...
3
1269
by: Gregory Gadow | last post by:
Is there a way to create structured files in .NET 2.0? Essentially, I want to take a hierarchic web site and convert it to a single, navigatable file similar to the compiled help, but using my own...
6
2527
by: chrispwd | last post by:
Hello, I have a situation where I have a file that contains text similar to: myValue1 = contents of value1 myValue2 = contents of value2 but with a new line here myValue3 = contents of...
0
1005
by: Griff | last post by:
Hi Is it possible to query a structured file that is a FIXED WIDTH file rather than a delimited file? I think it would be great to first define how many columns one is expecting and the width...
8
1929
by: Bryan.Fodness | last post by:
Hello, I am having trouble writing the code to read a binary string. I would like to extract the values for use in a calculation. Any help would be great. Here is my function that takes in...
17
27898
by: csharpusr | last post by:
Hello, I'm looking for some C# code that loads a iCalendar file from a wesbite, loops through the .ics file and extracts the event details from each event in the file. I don't want to use...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7137
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7074
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3210
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.