Re: Text Functions
From: MGFoster (me_at_privacy.com)
Date: 03/02/05
- Next message: scoopy2: "Re: Form for parameter query"
- Previous message: Cheryl: "Re: Importing Data from Multiple Access Tables into One Table"
- In reply to: Kirk P.: "Text Functions"
- Next in thread: Kirk P.: "Re: Text Functions"
- Reply: Kirk P.: "Re: Text Functions"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 02 Mar 2005 20:47:00 GMT
Kirk P. wrote:
> Is there a function to remove spaces within a text field?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
There isn't a built-in one. Try this:
Function NoSpaces(ByVal s As String) As String
Const WHITESPACE = " "
s = Trim$(s)
Dim p As Long
p = InStr(s, WHITESPACE)
Do While p > 0
s = Left$(s, p - 1) & Mid$(s, p + 1)
p = InStr(p, s, WHITESPACE)
Loop
NoSpaces = s
End Function
-- MGFoster:::mgf00 <at> earthlink <decimal-point> net Oakland, CA (USA) -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQA/AwUBQiYmQYechKqOuFEgEQK2fwCgom0kccXof542/iDl4WUxG1inl/gAoNFz zok80z7tPp2+Ero3V5l3Dr4r =IxoP -----END PGP SIGNATURE-----
- Next message: scoopy2: "Re: Form for parameter query"
- Previous message: Cheryl: "Re: Importing Data from Multiple Access Tables into One Table"
- In reply to: Kirk P.: "Text Functions"
- Next in thread: Kirk P.: "Re: Text Functions"
- Reply: Kirk P.: "Re: Text Functions"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|