I need to strip out carriage returns from a memo field. Basically, one of
the commercial databases we have uses a memo field for the address, and what
I'd like to do is get rid of the carriage returns so I can have the address
on a single line (possibly separated by commas) in a different database. Any
suggestions gratefully received.
Apologies if you replied to this earlier, I think my ISP must have dropped
the newsgroup a week or two ago and has only just started to receive it
again.
Dave 3 2021
This should work in Access 2000, 2002 and 2003:
1. Create a query into this table.
2. Change it to an Update query. (Update on Query menu).
Access adds a new row to the grid.
3. Drag the memo (named MyField in this example) into the grid.
In the Update row, enter:
Replace([MyField], Chr(13) & Chr(10), ", ")
4. Run the query.
If you have problems in A2000, see: http://support.microsoft.com/?id=225956
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Dave" <no****@yourbus iness.com> wrote in message
news:41******** *************** @ptn-nntp-reader02.plus.n et... I need to strip out carriage returns from a memo field. Basically, one of the commercial databases we have uses a memo field for the address, and what I'd like to do is get rid of the carriage returns so I can have the address on a single line (possibly separated by commas) in a different database. Any suggestions gratefully received.
Apologies if you replied to this earlier, I think my ISP must have dropped the newsgroup a week or two ago and has only just started to receive it again.
Thanks Allen
I gave it a go exactly as you suggested, but it comes up with 'UNDEFINED
FUNCTION REPLACE IN EXPRESSION'. I know SQL can handle replace, but it
doesn't look as though Access recognises it within this particular case. I'm
using Access 2000 and the link you included refers to problems evaluating
time and date expressions.
Dave
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message
news:41******** *************** @per-qv1-newsreader-01.iinet.net.au ... This should work in Access 2000, 2002 and 2003:
1. Create a query into this table.
2. Change it to an Update query. (Update on Query menu). Access adds a new row to the grid.
3. Drag the memo (named MyField in this example) into the grid. In the Update row, enter: Replace([MyField], Chr(13) & Chr(10), ", ")
4. Run the query.
If you have problems in A2000, see: http://support.microsoft.com/?id=225956
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Dave" <no****@yourbus iness.com> wrote in message news:41******** *************** @ptn-nntp-reader02.plus.n et...I need to strip out carriage returns from a memo field. Basically, one of the commercial databases we have uses a memo field for the address, and what I'd like to do is get rid of the carriage returns so I can have the address on a single line (possibly separated by commas) in a different database. Any suggestions gratefully received.
Apologies if you replied to this earlier, I think my ISP must have
dropped the newsgroup a week or two ago and has only just started to receive it again.
The kb article lists these functions as having the problem:
FormatCurrency( ),
FormatDateTime( ),
FormatNumber(),
FormatPercent() ,
InStrRev(),
MonthName(),
*Replace()*,
Round(),
StrReverse(),
WeekdayName()
The kb article suggests making a wrapper fucnction, and calling that
function instead of trying to use Replace(), in any context that requires
the Expression Service in A2000. The query context does use the ES.
Function MyReplace(strEx pression As String, _
strFind As String, _
strReplace As String, _
Optional lngStart As Long = 1, _
Optional lngCount As Long = -1) As String
MyReplace = Replace(strExpr ession, strFind, strReplace, lngStart,
lngCount)
End Function
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Dave" <no****@yourbus iness.com> wrote in message
news:41******** *************** @ptn-nntp-reader02.plus.n et... Thanks Allen
I gave it a go exactly as you suggested, but it comes up with 'UNDEFINED FUNCTION REPLACE IN EXPRESSION'. I know SQL can handle replace, but it doesn't look as though Access recognises it within this particular case. I'm using Access 2000 and the link you included refers to problems evaluating time and date expressions.
Dave
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message news:41******** *************** @per-qv1-newsreader-01.iinet.net.au ... This should work in Access 2000, 2002 and 2003:
1. Create a query into this table.
2. Change it to an Update query. (Update on Query menu). Access adds a new row to the grid.
3. Drag the memo (named MyField in this example) into the grid. In the Update row, enter: Replace([MyField], Chr(13) & Chr(10), ", ")
4. Run the query.
If you have problems in A2000, see: http://support.microsoft.com/?id=225956
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"Dave" <no****@yourbus iness.com> wrote in message news:41******** *************** @ptn-nntp-reader02.plus.n et... >I need to strip out carriage returns from a memo field. Basically, one >of > the commercial databases we have uses a memo field for the address, and > what > I'd like to do is get rid of the carriage returns so I can have the > address > on a single line (possibly separated by commas) in a different > database. > Any > suggestions gratefully received. > > Apologies if you replied to this earlier, I think my ISP must have dropped > the newsgroup a week or two ago and has only just started to receive it > again.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Les Juby |
last post by:
Can someone please help with a suggestion as to how I can keep the
formatting (carriage returns) that the user enters into a memo field
and then display that later.
I figured I might be able to use:
'replace carriage returns with BRs
comment=Replace(comment, chr(13), "<br>")
but obviously net.!
The <pre> tag doesn't sem to help either as the embedded return is
|
by: eagleofjade |
last post by:
I am trying to import data from a Word document into an Access table
with VBA.
The Word document is a form which has various fields. One of the fields
is a field for notes. In some cases, this note field contains carriage
returns.
When I import a note field that has carriage returns, what shows up in
the Access field are vertical black lines where the carriage return
should be.
|
by: Maxxam |
last post by:
Hi,
I have a simple question but i can't solve it simple. How can i remove
carriage returns and linfeed characters , \n\r, form a string?
Thanks,
Andre
|
by: Matt Mercer |
last post by:
Hi all,
I am having a frustration problem, and I have read about 25 newsgroup
postings that do not have a satisfying answer :)
The problem appears to be common where carriage returns are lost when
pulling data from an SQL database. The thing that frustrates me the
most, is that when I use Enterprise Manager, the carriage returns ARE
THERE. It looks fine until I pull it out.
|
by: TheDude5B |
last post by:
Hi,
I have some data which is stored in my MySQL database as TEXT. when the
data is entered in, it has some carriage returns in it, and this can be
seen when querying the data using MySQL Query Browser.
I want to then display this text within <p> tags when requested from
the database. However, the test is formatted without the carriage
returns.
| |
by: mattrapoport |
last post by:
I have a page with a div on it. The div displays a user comment. When
the user logs into this page, their current comment is pulled from a db
and displayed in the div. The user can edit the comment through a
pop-up that contains a textarea. When the user hits OK on the pop-up,
the text in the textarea is sent to a function on the main page. The
function inserts the text into the div's text node.
Please don't ask why I'm making this...
|
by: GregBeagle |
last post by:
Windows XP
I have a simple form from which I want to generate an email with the contents of the form. I use carriage returns to format the content for readability.
When I test it on my computer the email generated by getURL("mailto..") is fine in my email client. Carriage returns are kept etc and shows how I want it.
However when I upload it to the server and run it on the web, the carriage returns are stripped out of the text and all...
|
by: markus.shure |
last post by:
Hi,
I'm noticed a problem testing a JAX-WS client with a WSE server. The
JAX-WS client adds carriage returns to a SOAP header element that is
signed. This causes the WSE server to raise an error: "The signature
or decryption failed". If the carriage returns are removed, the same
web service call is successful.
I tried replicating the situation with a WSE client. I created a WSE
client that adds a SOAP header element that contains a...
|
by: evenlater |
last post by:
My db allows the user to send email via CDO. The body of the email is
determined in code. I have built an email form with To, CC and Subject
lines and a large text box for the body of the message so the user can
edit the default email message body before sending the message.
But when I populate the large text box (txtBody), I can't get it to
include the carriage returns. I've tried vbNewLine, vbCrLf, Chr(10)
and Chr(13). I've got the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |