A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Remove carriage returns in memo fields



 
 
Thread Tools Display Modes
  #1  
Old October 28th, 2009, 09:38 AM posted to microsoft.public.access.forms
Judith
external usenet poster
 
Posts: 54
Default Remove carriage returns in memo fields

I have imported some data from Excel where the Alt+ Enter has been used to
line space information in a cell. This comes over as | type character. Any
suggestion please as to how I can relace these characters with a carriage
return in the imported memo field.

Thanks
  #2  
Old October 28th, 2009, 09:46 AM posted to microsoft.public.access.forms
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default Remove carriage returns in memo fields

judith wrote:
I have imported some data from Excel where the Alt+ Enter has been used to
line space information in a cell. This comes over as | type character. Any
suggestion please as to how I can relace these characters with a carriage
return in the imported memo field.

Run an UPDATE query like this:

UPDATE [yourTable]
SET [yourMemoField] = Replace([yourMemoField],
Chr(10),
Chr(13) & Chr(10))

imho Excel only uses the Lf character:

Chr(10) is Lf
Chr(13) & Chr(10) is CrLf

be sure, that you have a backup copy of your table/database before
trying it.

mfG
-- stefan --
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:26 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.