-
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]
-
Code:
Mystring = "ddsfkdf fdkjfd fdjvdfs thisiswhatiwant"
MsgBox Right(Mystring, Len(Mystring) - InStrRev(Mystring, " ", , 0) + 1)
-
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
-
<?>
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
-
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
-
<?>
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
-
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