PC Review


Reply
Thread Tools Rate Thread

Carriage return & Line feeds

 
 
=?Utf-8?B?Slc=?=
Guest
Posts: n/a
 
      5th Oct 2005
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 Removed).

Thanks in advance.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Umlja3kgSGlja3MgTVZQ?=
Guest
Posts: n/a
 
      5th Oct 2005
Use the built in function Replace() to do what you need ...

R. Hicks

"JW" wrote:

> 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 Removed).
>
> Thanks in advance.
>

 
Reply With Quote
 
 
 
 
Albert D.Kallal
Guest
Posts: n/a
 
      5th Oct 2005
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...


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)
http://www.members.shaw.ca/AlbertKallal


 
Reply With Quote
 
=?Utf-8?B?TUlLZW1w?=
Guest
Posts: n/a
 
      5th Oct 2005
Hi JW

If 'Replace' is not available to you try Unix2Dos for free at
http://www.shareup.com/Unix2Dos-download-35984.html

Regards

Mike

"JW" wrote:

> 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 Removed).
>
> Thanks in advance.
>

 
Reply With Quote
 
=?Utf-8?B?Slc=?=
Guest
Posts: n/a
 
      5th Oct 2005
Thanks Albert, I created an update query with your text and it worked like a
charm!

"Albert D.Kallal" wrote:

> 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...
>
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> (E-Mail Removed)
> http://www.members.shaw.ca/AlbertKallal
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WebClient.DownloadFile - Missing Carriage Returns & Line Feeds Lila Godel Microsoft VB .NET 2 6th Nov 2005 01:17 AM
Inserting carriage returns or line feeds into data destined for MS Word. AF Microsoft Excel Programming 1 2nd Nov 2004 07:26 PM
Help! MailMessage Body is stripping carriage return/line feeds Tim Mavers Microsoft C# .NET 1 27th Feb 2004 10:14 PM
Help! MailMessage Body is stripping carriage return/line feeds Tim Mavers Microsoft Dot NET 1 27th Feb 2004 10:14 PM
Help! MailMessage Body is stripping carriage return/line feeds Tim Mavers Microsoft Dot NET Framework 1 27th Feb 2004 10:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:15 PM.