ENTER KEY (keyascii=13) values to Null  in  a STRING

Posted on 2003-03-24
Medium Priority
Last Modified: 2012-05-04
I need to replace the ENTER KEY (keyascii=13) values to Null  in  a STRING.

How can i do that using REPLACE function
or  some other method?

 Str1=  "Provide details on your quesiton.     <Enter Key>
         <Enter Key>
         <Enter Key>
         Please be as precise and clear as possible."

I need the result should be

  Str1=  "Provide details on your quesiton.Please be as precise and clear as possible."


Question by:vinspire
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 28

Accepted Solution

vinnyd79 earned 150 total points
ID: 8196201
do you mean replace a carriage return line feed?

NewStr = Replace(Str1,vbcrlf,"")
LVL 44

Expert Comment

ID: 8196218
str1 = replace(str1, "<Enter key>","")


str1 = replace(str1,vbCR,"")

it also maybe that what is really embedded in the string is the combination (Carriage Return + Line Feed), in which case the second would be changed to

str1 = Replace(str1, vbCrLf,"")


LVL 44

Expert Comment

ID: 8196223
too slow   LOL

Expert Comment

ID: 8216302
just say REPLACE, but only in SQL client-servre, hope i understood yur question....

syntax: REPLACE "old", "new"

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question