473,320 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Removing Carriage Returns

Hi All,

I am trying to remove carriage returns from a text field via some code.

Here is an example of what I am up against.

The field streetname contains the little square box that I believe is a
carriage return.

So, the field will have text, the little square box and more text. I
am trying to remove whatever that little box is. I tried to paste it
into this but it just moved the latter text to a new line, hence the
carriage return.

Any help would be appreciated.

Thanks

Jun 8 '06 #1
3 26235
if string s contains your address, one of the following will do the trick:

(most likely case first)

s = replace(s, vbcrlf, ", ") 'if it's a CR/LF pair, you'll
get a comma instead

or

s = replace (s, chr(10), ", " 'if it's just a Line Feed, you get a
comma instead

or

s = replace (s, chr(13), ", " 'if it's just a Carraige Return, you
get a comma instead
Jun 8 '06 #2
Rick,

Thanks so much and I definitely was making that much more difficult
than it needed to be.

It was the 2nd one that did the trick.

Thanks Again,

Jun 8 '06 #3
Great.

By the way, there are constants for those other things. I just forgot about
them? vbCr and vbLf are chr(13) and chr(10) respectively.
Jun 8 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Augustus | last post by:
Hiya, I have a form with a <textarea></textarea> to receive user input. This input is then stored in a database and sent by fax... I need to be able to remove the carriage returns (enter...
4
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...
3
by: JMCN | last post by:
does anyone know how to take out {enter} strings from a field? for instance, i have: "INTWEST ADJUSTMENT ORG ILLINOIS FUND PARTICIPANT DIVIDEND". i managed to take out extra spaces but then it...
2
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...
8
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...
7
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...
1
by: cgillett76 | last post by:
Hello, I'm using InfoPath to write data to a accessvdatabase. Once the form has been submitted a VB script runs to create a text file to input to another application. Some of the fields contain...
0
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...
2
by: Shrutisinha | last post by:
Hi guys I am trying to remove carriage return /space in perl from my file using this function : $record =~ s/+/ /g; OR chomp($record); nothing is working , can anybody help...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.