Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Carriage Returns/Line Feeds from Import 1

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
US
So I am getting that little box in my records after an import, and I don't want it to be there.

I would like to update the fields to remove it with nothing.

I planned on using the easy update solution provided by AceMan:

Code:
Public Function CorrectPhone(ByVal PhNum)
   PhNum = Replace(PhNum, "(", "")
   PhNum = Replace(PhNum, ")", "")
   PhNum = Replace(PhNum, "-", "")
   PhNum = Replace(PhNum, " ", "")
   CorrectPhone = PhNum
End Function
(though not a phone number this time)

Obviously, my one problem is what to look for for this character? So it should be:

PhNum = Replace(PhNum, "____", "")

Thanks. Sena.
 
PhNum = Replace(Replace(PhNum, vbCr, ""), vbLf, "")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That is so ******* awesome!

This has been a huge pain in the rear!

Thanks. Sean.
 
Oops, didn't really work.

The above removed all of my carriage returns. I just want to remove the little box symbol like:

Code:
?Solaris Check for

From inside the field. I don't know if this import error is from carriage returns or tab-spaces, but I want to get the boxes out but leave the exisiting carriage returns alone.

Thanks. Sean.
 
I think they are from "tabs" in the original document.

Thanks. Sean.
 
So, you wanted just this ?
PhNum = Replace(PhNum, vbTab, "")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top