Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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
  • 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

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

577 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