Space

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

I need to remove any leading spaces from a text field.

I have " Coat"
I want "Coat"

I''ve tried Rtrim() and Cstr() with no luck. There must be a simple
function for this, but I can't find it.

Thanks.
 
Justin said:
I need to remove any leading spaces from a text field.

I have " Coat"
I want "Coat"

I''ve tried Rtrim() and Cstr() with no luck. There must be a simple
function for this, but I can't find it.


Um, did you try LTrim() ?

LTrim - trim spaces from the left of the string (leading spaces)
RTrim - trim spaces from the right of the string (trailing spaces)
Trim - trim leading and trailing spaces from the string

Using Access 2003, if I type Trim into the help box, the first topic I get
back is a summary of these functions, titled "Remove spaces from the
beginning and end of a text value".
 
Thank you, I'm an idiot.

Dirk Goldgar said:
Um, did you try LTrim() ?

LTrim - trim spaces from the left of the string (leading spaces)
RTrim - trim spaces from the right of the string (trailing spaces)
Trim - trim leading and trailing spaces from the string

Using Access 2003, if I type Trim into the help box, the first topic I get
back is a summary of these functions, titled "Remove spaces from the
beginning and end of a text value".

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 
Back
Top