Carriage return & Line feeds

G

Guest

I'm importing some data into a MS access memo field and I'm having problems
getting the carriage return / line feeds entered. The text file I'm
importing is a UNIX file that has '\n' for new line entries. Is there any
way to do a search & replace to convert the '\n' characters to a line break
or carriage return?

The search & replace functionality in MS Word allows replacing with special
characters, but I can't figure out how to do it in access.

Please email (e-mail address removed).

Thanks in advance.
 
A

Albert D.Kallal

Well, if you got a backup, then you can whack ctrl-g, and in the command
prompt (immediate) window, you an type:


CurrentDb.Execute "update test1 set YourFieldName =
replace(YourFieldName,chr$(10),chr$(13) & chr$(10))"

Note that this will also operate on existing records, and you don't want to
"run" the update more then once...
 
G

Guest

Thanks Albert, I created an update query with your text and it worked like a
charm!
 

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