By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,027 Members | 1,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,027 IT Pros & Developers. It's quick & easy.

Trim????

P: n/a
Hi I have a text field called FName.
Records looks like this

8 Kingston
10 Wilston
I would like to delete all from the left including the space

Result
Kingston
Wilston

Any help would be appreciated
Graham

Nov 23 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Graham Feeley" <gr***********@optusnet.com.auwrote in message
news:45**********************@news.optusnet.com.au ...
Hi I have a text field called FName.
Records looks like this

8 Kingston
10 Wilston
I would like to delete all from the left including the space

Result
Kingston
Wilston

Any help would be appreciated
Graham
Paste this into a module:

Public Function libTrim(str As String) As String

Dim intStart As Integer
intStart = InStr(str, " ")
libTrim = Right(str, Len(str) - intStart)

End Function

Call it from a query based on your table:

Expr1: libTrim([FName])

HTH - Keith.
www.keithwilby.com
Nov 23 '06 #2

P: n/a
Well Thank you very much Keith, worked a charm.
I spent hours searching for code to do it so I gave up and posted here.
Very fast reply I must say , probably was there only half an hour
Appreciate it and have bookmarked your Website
Regards
Graham

"Keith Wilby" <he**@there.comwrote in message
news:45**********@glkas0286.greenlnk.net...
"Graham Feeley" <gr***********@optusnet.com.auwrote in message
news:45**********************@news.optusnet.com.au ...
>Hi I have a text field called FName.
Records looks like this

8 Kingston
10 Wilston
I would like to delete all from the left including the space

Result
Kingston
Wilston

Any help would be appreciated
Graham

Paste this into a module:

Public Function libTrim(str As String) As String

Dim intStart As Integer
intStart = InStr(str, " ")
libTrim = Right(str, Len(str) - intStart)

End Function

Call it from a query based on your table:

Expr1: libTrim([FName])

HTH - Keith.
www.keithwilby.com

Nov 23 '06 #3

P: n/a
"Graham Feeley" <gr***********@optusnet.com.auwrote in message
news:45**********************@news.optusnet.com.au ...
Well Thank you very much Keith, worked a charm.
I spent hours searching for code to do it so I gave up and posted here.
Very fast reply I must say , probably was there only half an hour
Appreciate it and have bookmarked your Website
Regards
Graham
My pleasure, glad I could help.

Regards,
Keith.
Nov 23 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.