Please help with Importing a multi line text

A

Al

How can I import a Paragraph of text as one record. The
way Access imports it now is making each line a record. I
need to import the entire paragraph as one record. The
field I am importing into is a memo field and I am using
Access 97.
thank you
Al
 
E

Edmund

What you need to do is you cannot use the import function, you have to use VBA code to do i
try something like the following codes!!

Const ForReading = 1, ForWriting = 2, ForAppending =
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse =
Dim fs, f, ts,
Set fs = CreateObject("Scripting.FileSystemObject"

Set f = fs.GetFile("c:\try1.txt"
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault
Dim readli
Do Until ts.atendofstream = Tru
readlin = ts.readlin
MsgBox readli
Loo

ts.Clos
----- Al wrote: ----

How can I import a Paragraph of text as one record. The
way Access imports it now is making each line a record. I
need to import the entire paragraph as one record. The
field I am importing into is a memo field and I am using
Access 97
thank yo
A
 
J

John Nurick

Hello Al,

Access can import multi-line data from CSV files, so if you can edit the
text file to fit the rules Access applies you should be OK:

1) Records must be separated by standard Windows linebreaks (CRLF).
2) Fields must be separated by commas.
3) Text fields that contain commas must be enclosed in quote marks (it
does no harm to enclose all text fields in quotes)
4) Quote marks within text fields must be doubled.

So if the original data is this:
When they had finished, he turned and
said to her, "Thank you very much."

It needs to become
"When they had finished, he turned and
said to her, ""Thank you very much."""
 
J

Joe Fallon

Hey John,
Are you aspiring to become a writer of Romance novels???? <g>

That was quite the quote!
 
J

John Nurick

Hey John,
Are you aspiring to become a writer of Romance novels???? <g>

That was quite the quote!

It has truly been said, "A dirty mind is a joy forever!"
 

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