Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using RIGHT with INSTR

Status
Not open for further replies.

jlclancy

Technical User
May 22, 2009
13
I am using this code to try and delete everything from the beginning bracket [ to the first semicolon. The memo field starts with the bracket and has several ';' however I only need to delete to the first semicolon. For example, the first pass shows a semicolon at 34; when I execute this code I get the last 34 characters, not the entire lenght except the first 34 characters...

stringVar str;
Str := {Police.Narrative};
Right(Str, InStr(Str, ";") -1))

Any suggestions?

thanks!

 
try this...


stringVar str;
Str := {police.narrative};
Mid(Str, InStr(Str, ";")+1)

just an fyi -- you don't NEED to create the variable to handle this.

-- Jason
"It's Just Ones and Zeros
 
I removed the variable and it worked, thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top