Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2004
    Posts
    7

    Unanswered: create new field from data after last space in a field?

    Hello,

    I'm in need of some help. This is my first ever post here, though I have learned a lot from these forums, so please be kind.

    I have a "name" field with a variable number of spaces in it. I need to create a new field that contains just the information found after the last space in the "name" field.

    Your help is greatly appreciated.

    Thanks,
    Tony

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    What I understood, you want to search the last Space in your filed, don't you?
    If so then
    make a loop to search the space i.e chr$(32) using the InStr() function, till you get the last space, then use the Mid$ function to get the part after the last space.

    Hope that could help.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    hammbakka, spot on as usual...

    might I suggest using the StrReverse() function to first reverse the string, thereby making locating the first space a good deal less intensive..
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    There is no StrRevers under the Office 97 so I don't know that function, But you can use Tedde's suggestion under Acce$$ 2000 or heighter...

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Gah... hamm, it's time to upgrade my friend.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    I don't want headech with Acce$$ 2000 and heigher, I am old fashoned still with 97

  7. #7
    Join Date
    Dec 2003
    Posts
    27

    Talking

    hammbakka, well I know ppl who still prefer Windows 3.x

  8. #8
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Cool

    Quote Originally Posted by Oleg123
    hammbakka, well I know ppl who still prefer Windows 3.x

    WFWG 3.11 here here, though I no longer have it I really enjoyed it and NEVER had a problem with it. Now with 98SE and XP I get headaches, cramps, nausea.....lol

    Bud

  9. #9
    Join Date
    Jun 2004
    Posts
    7

    Thank you all!

    Thanks to everyone that replied! Special thanks to Teddy! I wasn't aware of this function! That's a perfect solution. You are very knowledgeable and helpful!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •