Please help with Importing a multi line text

  • Thread starter Thread starter Al
  • Start date Start date
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
 
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
 
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."""
 
Hey John,
Are you aspiring to become a writer of Romance novels???? <g>

That was quite the quote!
 
Back
Top