Results 1 to 7 of 7

Thread: Help with strings

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Ontario, Canada
    Posts
    61

    Angry

    Umm.

    Guys I have a Program that uses a database and I have it so when they click on a button it comes up with everything in the row they selected and each string is seperated with a space how do I get it so that it just displays the stuff after the last space and not anything else.
    It is like this:
    ddsfkdf fdkjfd fdjvdfs thisiswhatiwant

    how do I get it so it only displays

    thisiswhatiwant in the msgbox instead of the other stuff

    or better yet get the data from just that cell (I use adodc and the data grid to access my MDB) if anyone knows how to get data directly from a cell it would be more apprciated than giving a code to sift through the whole string

    Thanks

    (I hope that is not to complicated)

    [Edited by absalom on 11-17-2000 at 11:22 PM]
    ---~^ Absalom ^~---

    There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.

  2. #2
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372
    Code:
    Mystring = "ddsfkdf fdkjfd fdjvdfs thisiswhatiwant"
    MsgBox Right(Mystring, Len(Mystring) - InStrRev(Mystring, " ", , 0) + 1)

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Ontario, Canada
    Posts
    61
    Not working because my string is like this (i guess I shoulda put this earlier)

    Mystring = "fdsgfdg fdsgfdsg fsdhsdg This is what I want"
    notice there are spaces in the string I want

    I want the whole not just "want" I want "This is what I want"

    Thanks
    ---~^ Absalom ^~---

    There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    How do you know you want
    "This is what I want"
    what distinguises it from
    adfsdf dfdsfa lsdsfkl thisis what I want this is what I want
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Ontario, Canada
    Posts
    61
    because in my database that is the filename and I want it to run that but I can't get code to select just that
    ---~^ Absalom ^~---

    There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.

  6. #6
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    If it is a filename does it have it's own field in the database?
    What is the structure of the database fields?
    field1 = path
    field2 = filename
    etc.

    Being as it is a filename and you know that how can you be sure you want bla bla bla when a file name could be bla bla bla bla bla.

    Why I am asking is, if it is unique then it can be pulled but more information would help. why don't you post the code you are trying and the structure of the mdb.

    Wayne
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  7. #7

    Thread Starter
    Member
    Join Date
    Jul 2000
    Location
    Ontario, Canada
    Posts
    61
    Actually I figured something

    out make a hidden text box and have its data source link to your database and put its data field as the field from the database you want and it works

    just make the shellexecute link to your hidden text box
    ---~^ Absalom ^~---

    There is nobody in the world who knows everything there is no one his/her workforce who knows everything what really makes the person smart is that he/she is not affraid to ask for help.

Posting Permissions

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



Click Here to Expand Forum to Full Width